/* if any side switches to tunnel mode, the other one does too */
channel_auto_read(chn);
txn->req.msg_state = HTTP_MSG_TUNNEL;
+ chn->flags |= CF_NEVER_WAIT;
goto wait_other_side;
}
*/
channel_auto_read(chn);
txn->req.msg_state = HTTP_MSG_TUNNEL;
+ chn->flags |= CF_NEVER_WAIT;
}
if (chn->flags & (CF_SHUTW|CF_SHUTW_NOW)) {
/* if any side switches to tunnel mode, the other one does too */
channel_auto_read(chn);
txn->rsp.msg_state = HTTP_MSG_TUNNEL;
+ chn->flags |= CF_NEVER_WAIT;
goto wait_other_side;
}
*/
channel_auto_read(chn);
txn->rsp.msg_state = HTTP_MSG_TUNNEL;
+ chn->flags |= CF_NEVER_WAIT;
}
if (chn->flags & (CF_SHUTW|CF_SHUTW_NOW)) {
wait_other_side:
http_silent_debug(__LINE__, s);
+ /* We force the response to leave immediately if we're waiting for the
+ * other side, since there is no pending shutdown to push it out.
+ */
+ if (!channel_is_empty(chn))
+ chn->flags |= CF_SEND_DONTWAIT;
return txn->rsp.msg_state != old_state || chn->flags != old_flags;
}