websockets-rs / websockets-rs/rust-websocket
async client stream does not know when a connection closes
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1.6k
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Problem: When a connection closes abnormally, the client stream does not return or acknowledge the broken connection.
Desired Behavior: When a connection closes abnormally, the client stream resolves immediately.
Quick demo of the problem, using the async-client + async-server examples:
- start the server
- start the client (and it connects to the server)
- kill the server with ctrl-C
The client stream remains open and shows no sign that the connection has closed. If the user sends a message via stdin_ch, the client accepts the message. If you send a second message, the client finally panics with a Broken Pipe IO error.
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 async-client and async-server examples mentioned in the issue, and trace how the client stream handles the server closing its connection. Reproduce the Ctrl-C scenario; done means the client stream resolves immediately after an abnormal close instead of remaining open until another send causes a Broken Pipe panic.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100