Loading src/http.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,15 @@ void libhttppp::HttpClient::resetConnection(){ } _cltsock = std::move(sslsock); _cltsock->connect(_url.getHost(), _url.getPort(), false); // connectTimeout(), not connect(nonblock=false): the latter bounds the TCP connect at a // fixed 10s *per resolved address* and then the TLS handshake at a further fixed 15s on // top (see netplus::ssl::connect()), both completely independent of _recvTimeoutSec/ // setTimeout() -- a dead/unresponsive HTTPS upstream could take up to ~35s to fail // regardless of any timeout this caller configured. connectTimeout() bounds the whole // connect+handshake against _recvTimeoutSec itself, the same budget every other timeout // in this class already honors (see the "Honor setTimeout()" comments elsewhere in this // file). _cltsock->connectTimeout(_url.getHost(), _url.getPort(), _recvTimeoutSec * 1000); _cltsock->setNonBlock(); // Check negotiated ALPN after TLS handshake Loading Loading
src/http.cpp +9 −1 Original line number Diff line number Diff line Loading @@ -402,7 +402,15 @@ void libhttppp::HttpClient::resetConnection(){ } _cltsock = std::move(sslsock); _cltsock->connect(_url.getHost(), _url.getPort(), false); // connectTimeout(), not connect(nonblock=false): the latter bounds the TCP connect at a // fixed 10s *per resolved address* and then the TLS handshake at a further fixed 15s on // top (see netplus::ssl::connect()), both completely independent of _recvTimeoutSec/ // setTimeout() -- a dead/unresponsive HTTPS upstream could take up to ~35s to fail // regardless of any timeout this caller configured. connectTimeout() bounds the whole // connect+handshake against _recvTimeoutSec itself, the same budget every other timeout // in this class already honors (see the "Honor setTimeout()" comments elsewhere in this // file). _cltsock->connectTimeout(_url.getHost(), _url.getPort(), _recvTimeoutSec * 1000); _cltsock->setNonBlock(); // Check negotiated ALPN after TLS handshake Loading