n0-computer / n0-computer/net-tools
Make sure wakers are not overwritten for write readyness
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 29
- Forks
- 36
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 6
Description
Context from this in a PR discussion: https://github.com/n0-computer/net-tools/pull/26#discussion_r2115436630
The way to fix this is to use .writable() and store the future to for polling, similar to how we do it in quinn.
However, in this case it's a little more complicated, since we've also got a lock around our socket, and might have to replace the socket when it errors out and needs to be rebound, so we should also store multiple wakers for each task that tried to send on a currently-being-replaced socket.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with the linked PR discussion and compare the proposed use of tokio's UdpSocket.writable() with quinn/src/runtime/tokio.rs. Trace how the socket lock and rebinding on errors interact with senders, then ensure each task's waker remains registered while a socket is being replaced.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100