websockets-rs / websockets-rs/rust-websocket

Timeout on waiting for incoming WS connections

Open
#243 0 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

I would like to be able to run server.accept() and have it block for a Duration, after which I have an opportunity to perform other logic before continuing my loop.

My purpose is so I can implement a kill switch (an Arc<AtomicBool>, updated elsewhere) and end my thread if it's flipped.

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 at the server.accept() entry point and trace how incoming WebSocket connections are currently waited for. Determine how a Duration-based timeout should return control to the caller so it can inspect the Arc kill switch, then verify that the server loop can continue accepting connections after the timeout.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.