return 1;
}
+ /* If the request channel is waiting for the connect(), we mark the read
+ * side as attached on the response channel and we wake up it once. So
+ * it will have a chance to forward data now.
+ */
+ if (req->flags & CF_WAKE_CONNECT) {
+ rep->flags |= CF_READ_ATTACHED;
+ req->flags |= CF_WAKE_ONCE;
+ req->flags &= ~CF_WAKE_CONNECT;
+ }
+
/* we need to wait a bit more if there was no activity either */
if (!(req->flags & CF_WRITE_ACTIVITY))
return 1;
si_rx_endp_more(si);
rep->flags |= CF_READ_ATTACHED; /* producer is now attached */
- if (req->flags & CF_WAKE_CONNECT) {
- req->flags |= CF_WAKE_ONCE;
- req->flags &= ~CF_WAKE_CONNECT;
- }
if (objt_cs(si->end)) {
/* real connections have timeouts */
req->wto = s->be->timeout.server;
return;
}
+ /* For applets, there is no connection establishment, but if the
+ * request channel is waiting for it, we mark the read side as
+ * attached on the response channel and we wake up it once. So
+ * it will have a chance to forward data now.
+ */
+ if (s->req.flags & CF_WAKE_CONNECT) {
+ s->res.flags |= CF_READ_ATTACHED;
+ s->req.flags |= CF_WAKE_ONCE;
+ s->req.flags &= ~CF_WAKE_CONNECT;
+ }
+
if (tv_iszero(&s->logs.tv_request))
s->logs.tv_request = now;
s->logs.t_queue = tv_ms_elapsed(&s->logs.tv_accept, &now);