Commit 6fda2e22 authored by jan.koester's avatar jan.koester
Browse files

test

parent ead19e3c
Loading
Loading
Loading
Loading
+9 −1
Original line number Diff line number Diff line
@@ -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