sta / sta/websocket-sharp

error when running server example

Open
#718 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

The server example starts fine, but as soon as someone sends it a message, it crashes with this error:

1/11/2023 3:05:09 PM|Error|<>c__DisplayClass70_0.b__0|Operation is not supported on this platform.
1/11/2023 3:05:09 PM|Fatal|WebSocket.b__176_2|System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'System.Net.Sockets.NetworkStream'.
at System.Net.Sockets.NetworkStream.EndRead(IAsyncResult asyncResult)
at WebSocketSharp.Ext.<>c__DisplayClass48_0.b__0(IAsyncResult ar)

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 by running the server example and sending it a message to reproduce the “Operation is not supported on this platform” error. Trace the receiveRequest and startReceiving paths, including the NetworkStream disposal shown in the stack trace; done means the example handles a message without crashing.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.