Session instance state is closed, how do I verify state before session.Send?

Open
#428 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
csharp
Domain
networking

Research direction

Start with the session.Send entry point and the base-class session state handling mentioned in the report. Trace how the closed state is represented and how threaded callers interact with sending. Done means establishing a documented, safe way to handle a session that may close before or during Send.

Written by the indexing model from the issue text.

Description

So, I have everything working on a pub/sub system and a chat app, but I'm having a problem with some closed states. The session state is closed, so I cannot send to it. Is there anyway to check the state from the base class prior to attempting to send?

I'm using threads, so the state may be closed at the time of sending.

Dominant language
C#
Stars
6.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

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.

More from sta/websocket-sharp

All issues in sta/websocket-sharp

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.