Connecting dropped before handshake leaks the connection (no Drop cleanup)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
- #682 by @drlukeangel — closed without merging
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- rust
- Domain
- networking
Research direction
Locate the Connecting type and trace its pre-handshake lifecycle through implicit_close, ConnectionDriver, and EndpointInner; start by reading how connection drops currently signal cleanup. Confirm the change by exercising or adding coverage for an inbound handshake dropped before completion, with the connection state and associated channels removed from the endpoint maps.
Written by the indexing model from the issue text.
Description
Summary
In-progress (Connecting) connections that are dropped before the handshake completes are never
reclaimed, leaking connection state once per aborted inbound handshake. We hit this running noq
(under iroh) where remote peers are abruptly killed without a graceful close.
Root cause
Connecting has no Drop implementation, so dropping it before handshake completion never signals
the connection task. Pre-handshake, the idle timeout isn't yet in effect and there's no handshake
timeout, while the background ConnectionDriver and the EndpointInner event-channel sender keep
the connection alive. The half-open connection (and its channels/packet spaces) therefore lingers in
the endpoint maps indefinitely.
Proposed fix
Implement Drop for Connecting to implicit_close() the connection when dropped before handshake
completion, so the driver drains it and the endpoint removes the handle. PR to follow. (Open
question for maintainers: pair with an explicit pre-handshake timeout, or is drop-driven cleanup the
right scope?)
- Dominant language
- Rust
- Stars
- 454
- Forks
- 98
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 19
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from n0-computer/noq
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
n0-computer/noq#892 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
n0-computer/noq#873 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
n0-computer/noq#872 ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
n0-computer/noq#904 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 Half a day Newbie friendliness 68/100
n0-computer/noq#895 ·
Maintainers usually reply within 1 day
Similar issues
-
area:web kind:bug priority:p2 ready
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
Maintainers usually reply within 1 day
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 84/100
sims1253/r-typeshed#140 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
storytold/craft-libs#2867 ·
Maintainers usually reply within 1 day
-
help wanted needs investigation priority: low
Difficulty 2/5 1-3 hours Newbie friendliness 62/100