Commit 1277f1c0 authored by jan.koester's avatar jan.koester
Browse files

fix

parent 9a8cfc9f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -830,7 +830,7 @@ libhttppp::HttpResponse libhttppp::HttpClient::GetStream(libhttppp::HttpRequest
            _streamH3Sid = stream_id;

            auto h3_pump = [&]() {
                for (int pump_i = 0; pump_i < 256; ++pump_i) {
                for (int pump_i = 0; pump_i < 16; ++pump_i) {
                    try {
                        q->pumpNetwork(MSG_DONTWAIT);
                    } catch (netplus::NetException &e) {
+5 −4
Original line number Diff line number Diff line
@@ -1279,10 +1279,10 @@ void libhttppp::HttpEvent::Http3StreamEvent(netplus::socket *sock,
            for (size_t i = 0;
                 i < max_iter && total_sent < content_length;
                 ++i) {
                // Periodically drain incoming QUIC datagrams so ACKs
                // Drain incoming QUIC datagrams every iteration so ACKs
                // and flow-control updates (MAX_DATA, MAX_STREAM_DATA)
                // are processed while this synchronous loop runs.
                if (++pump_counter % 8 == 0)
                // are processed promptly while this synchronous loop runs.
                if (++pump_counter % 4 == 0)
                    q->pumpIncoming();

                ResponseEvent(tempreq, h3tid, 0);
@@ -1316,7 +1316,8 @@ void libhttppp::HttpEvent::Http3StreamEvent(netplus::socket *sock,
                    }
                    if (empty_streak >= max_empty)
                        break;
                    std::this_thread::sleep_for(std::chrono::milliseconds(1));
                    // Yield briefly but don't add excessive latency
                    std::this_thread::yield();
                }
            }