Fatal: Cannot access a disposed object. Object name: 'SslStream'.
Open
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 6.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Fatal error on server:
|Fatal|<>c__DisplayClass174_0.<startReceiving>b__2:0|System.ObjectDisposedException: Cannot access a disposed object.
Object name: 'SslStream'.
at System.Net.Security.SslStream.<ThrowIfExceptional>g__ThrowExceptional|138_0(ExceptionDispatchInfo e)
at System.Net.Security.SslStream.EndRead(IAsyncResult asyncResult)
at WebSocketSharp.NetCore.Ext.<>c__DisplayClass59_0.<ReadBytesAsync>b__0(IAsyncResult ar)
Server: .NET 6,
Client: Unity 2021
I've not observed special circumstances to this crash. After this message sockets are closed.
It happens many times.
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 at WebSocketSharp.NetCore.Ext.ReadBytesAsync and inspect the callback leading to SslStream.EndRead, using the reported .NET 6 server and Unity 2021 client setup. Reproduce the disposed-stream failure and verify that this path no longer produces a fatal error while handling the socket closure appropriately.
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
- 35/100