Skip to content

http2/http3: client: send request when reusing an idle mux connection#3630

Closed
saghul wants to merge 23 commits into
warmcat:mainfrom
saghul:fix-h2-client-idle-mux-reuse
Closed

http2/http3: client: send request when reusing an idle mux connection#3630
saghul wants to merge 23 commits into
warmcat:mainfrom
saghul:fix-h2-client-idle-mux-reuse

Conversation

@saghul

@saghul saghul commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

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 and others added 23 commits July 10, 2026 06:13
quic-version-negotiation

qir-last-tests

xr-29

qir-l1-fix

sai: QIR with QIR_LWS_BRANCH
fixes-1
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.
@sonarqubecloud

Copy link
Copy Markdown

@lws-team
lws-team force-pushed the main branch 3 times, most recently from ad6fb9d to 655595b Compare July 16, 2026 07:31
@saghul saghul closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants