Skip to content

fix: keep QUIC connections without streams alive - #181

Merged
gmelodie merged 2 commits into
mainfrom
fix/keepalive
Oct 9, 2026
Merged

gmelodie merged 2 commits into
mainfrom
fix/keepalive

Conversation

@gmelodie

@gmelodie gmelodie commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

lsquic arms the client PING alarm in ietf_full_conn_ci_tick only while the connection has an open non-special stream. A libp2p connection often has no stream between requests, so it sends no PING and the idle timeout closes it. In a nimbus testnet, such a connection closes after 37 s.
This PR bumps libs/lsquic to iftech/lsquic#2, which arms the alarm whenever es_ping_period is set. The new test waits 12 s on a 3 s idle timeout, as stock lsquic sends NEW_CONNECTION_ID frames for 7 s after the handshake.

@richard-ramos richard-ramos left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets also update the settings.es_ping_period in context/server.nim and client.nim to 15s so we match go-libp2p!

@gmelodie
gmelodie marked this pull request as ready for review October 9, 2026 18:44
@gmelodie
gmelodie force-pushed the fix/keepalive branch 4 times, most recently from c4b8df6 to 5c7f073 Compare October 9, 2026 19:25
@vladopajic

Copy link
Copy Markdown
Member

/review

Comment thread tests/test_connection.nim Resolved
@gmelodie
gmelodie merged commit 91f8f4d into main Oct 9, 2026
21 checks passed
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.

3 participants