websockets-rs / websockets-rs/rust-websocket

async client stream does not know when a connection closes

Open
#136 7 comments 0 reactions 0 assignees View on GitHub

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:

  1. start the server
  2. start the client (and it connects to the server)
  3. 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.