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

test

parent 7af33521
Loading
Loading
Loading
Loading
+7 −0
Changes for src/http.cpp: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -419,6 +419,13 @@ void libhttppp::HttpClient::resetConnection(){
void libhttppp::HttpClient::_connectTcp(netplus::tcp &sock) {
    try {
        sock.connectTimeout(_url.getHost(), _url.getPort(), _recvTimeoutSec * 1000);
        // connectTimeout() leaves the socket blocking on success (see
        // tcp.cpp) -- every _recvBlocking()/_recvNonBlocking() call site
        // assumes a non-blocking fd, distinguishing "block" from
        // "don't block" purely by whether the caller retries after a Note
        // (EAGAIN) exception. Matches the setNonBlock() call already made
        // after every other connect path (QUIC/H3, TLS) in resetConnection().
        sock.setNonBlock();
    } catch (netplus::NetException &e) {
        HTTPException he;
        he[HTTPException::Error] << e.what();