if (!httpsCreate(clientConnection, sslContext))
return;
- // commSetConnTimeout() was called for this request before we switched.
+ // bumped intercepted conns should already have Config.Timeout.request set
+ // but forwarded connections may only have Config.Timeout.lifetime. [Re]set
+ // to make sure the connection does not get stuck on non-SSL clients.
+ typedef CommCbMemFunT<ConnStateData, CommTimeoutCbParams> TimeoutDialer;
+ AsyncCall::Pointer timeoutCall = JobCallback(33, 5, TimeoutDialer,
+ this, ConnStateData::requestTimeout);
+ commSetConnTimeout(clientConnection, Config.Timeout.request, timeoutCall);
// Disable the client read handler until CachePeer selection is complete
Comm::SetSelect(clientConnection->fd, COMM_SELECT_READ, NULL, NULL, 0);