recv 4
send "PONG"
+ expect_close
} -start
# non-conformant server: no websocket key
listen fe1
bind "fd@${fe1}"
+ timeout client 100ms
+ timeout server 100ms
+ timeout tunnel 1s
+ filter bwlim-in upload default-limit 1m default-period 1s
+ filter bwlim-out download default-limit 1m default-period 1s
+ http-request set-bandwidth-limit upload
+ http-request set-bandwidth-limit download
server s1 ${s1_addr}:${s1_port}
listen fe2
expect resp.http.upgrade == "websocket"
expect resp.http.sec-websocket-accept == "s3pPLMBiTxaQ9kYGzzhZRbK+xOo="
+ delay 0.2
send "PING"
recv 4
+ expect_close
} -run
# missing websocket key
* direction, and sometimes for a close to be effective.
*/
if (txn->flags & TX_CON_WANT_TUN) {
- /* Tunnel mode will not have any analyser so it needs to
- * poll for reads.
- */
+ /* Tunnel mode needs to poll for reads. */
channel_auto_read(&s->req);
txn->req.msg_state = HTTP_MSG_TUNNEL;
s->scb->flags &= ~SC_FL_NOHALF;
if (txn->rsp.msg_state != HTTP_MSG_TUNNEL)
s->res.flags |= CF_WAKE_ONCE;
+ else if (s->tunnel_timeout)
+ s->scf->ioto = s->scb->ioto = s->tunnel_timeout;
}
else {
/* we're not expecting any new data to come for this
txn->rsp.msg_state = HTTP_MSG_TUNNEL;
if (txn->req.msg_state != HTTP_MSG_TUNNEL)
s->req.flags |= CF_WAKE_ONCE;
+ else if (s->tunnel_timeout)
+ s->scf->ioto = s->scb->ioto = s->tunnel_timeout;
}
else {
/* we're not expecting any new data to come for this