Skip to content

test(iroh): fix racy connection shutdown#4243

Open
flub wants to merge 2 commits into
mainfrom
flub/racy-quic-shutdown
Open

test(iroh): fix racy connection shutdown#4243
flub wants to merge 2 commits into
mainfrom
flub/racy-quic-shutdown

Conversation

@flub
Copy link
Copy Markdown
Contributor

@flub flub commented May 7, 2026

Description

Waiting for stopped when the peer is about to shutdown is flaky and
not the recommended shutdown protocol. The CONNECTION_CLOSE could be
sent before all packets have been acked. And if the close arrives
before some acks then stopped (on the server) will fail with an
error.

CONNECTION_CLOSE is supposed to include any un-acked packets, but this
is only a best-effort and not a guarantee. This may not include all
packets if an ACK was already considered in-flight.

Breaking Changes

n/a

Notes & open questions

QUIC shutdown, it still gets us...

Change checklist

  • Self-review.
  • Tests if relevant.

Waiting for stopped when the peer is about to shutdown is flaky and
not the recommended shutdown protocol. The CONNECTION_CLOSE could be
sent before all packets have been acked. And if the close arrives
before some acks then stopped (on the server) will fail with an
error.

CONNECTION_CLOSE is supposed to include any un-acked packets, but this
is only a best-effort and not a guarantee. This may not include all
packets if an ACK was already considered in-flight.
@n0bot n0bot Bot added this to iroh May 7, 2026
@github-project-automation github-project-automation Bot moved this to 🚑 Needs Triage in iroh May 7, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/4243/docs/iroh/

Last updated: 2026-05-07T15:06:27Z

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: fe86386

@dignifiedquire dignifiedquire changed the title fix(tests): Fix racy connection shutdown test(iroh): fix racy connection shutdown May 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: 🚑 Needs Triage

Development

Successfully merging this pull request may close these issues.

2 participants