http2/http3: client: send request when reusing an idle mux connection#3630
Closed
saghul wants to merge 23 commits into
Closed
http2/http3: client: send request when reusing an idle mux connection#3630saghul wants to merge 23 commits into
saghul wants to merge 23 commits into
Conversation
quic-version-negotiation qir-last-tests xr-29 qir-l1-fix sai: QIR with QIR_LWS_BRANCH
When a client mux (h2/h3) connection goes idle between transactions it sits in LRS_IDLING. On reusing it for a new stream, lws_vhost_active_conns() adopts the new stream directly onto the network wsi but left it in LRS_IDLING. LRS_IDLING does not carry LWSIFS_POCB, so lwsi_state_can_handle_POLLOUT() is false for it and the network wsi's POLLOUT is never serviced: the child-walking POLLOUT loop never runs, the new stream's HEADERS are never sent (lws_h2_client_handshake() is never reached), and its response is never read. The request just hangs. Put the revived connection back into LRS_ESTABLISHED (the state it uses while actively muxing) and clear the keep-warm idle timeout, so its POLLOUT is serviced and the queued stream's headers go out. Same fix for the h3/quic branch.
|
lws-team
force-pushed
the
main
branch
3 times, most recently
from
July 16, 2026 07:31
ad6fb9d to
655595b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



When a client mux (h2/h3) connection goes idle between transactions it sits in
LRS_IDLING. On reusing it for a new stream, lws_vhost_active_conns() adopts
the new stream directly onto the network wsi but left it in LRS_IDLING.
LRS_IDLING does not carry LWSIFS_POCB, so lwsi_state_can_handle_POLLOUT() is
false for it and the network wsi's POLLOUT is never serviced: the child-walking
POLLOUT loop never runs, the new stream's HEADERS are never sent
(lws_h2_client_handshake() is never reached), and its response is never read.
The request just hangs.
Put the revived connection back into LRS_ESTABLISHED (the state it uses while
actively muxing) and clear the keep-warm idle timeout, so its POLLOUT is
serviced and the queued stream's headers go out. Same fix for the h3/quic
branch.