sta / sta/websocket-sharp

Abnormaly connection closed

Open
#321 0 comments 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

Hi , after of some period of time maybe 2-3 minutes our connection with server drops with this exception.

2/20/2016 9:58:51 PM|Fatal|<startReceiving>c__AnonStorey5.<>m__2|System.InvalidOperationException: Stream is closed.
                              at Mono.Net.Security.MobileAuthenticatedStream.CheckThrow (System.Boolean authSuccessCheck) [0x0000b] in /Users/builder/data/lanes/3969/44931ae8/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:91 
                              at Mono.Net.Security.MobileAuthenticatedStream.ProcessReadOrWrite (Mono.Net.Security.AsyncProtocolRequest& nestedRequest, Mono.Net.Security.BufferOffsetSize2& internalBuffer, Mono.Net.Security.AsyncOperation operation, Mono.Net.Security.BufferOffsetSize userBuffer, System.Net.LazyAsyncResult lazyResult) [0x0006b] in /Users/builder/data/lanes/3969/44931ae8/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:346 
                              at Mono.Net.Security.MobileAuthenticatedStream.BeginReadOrWrite (Mono.Net.Security.AsyncProtocolRequest& nestedRequest, Mono.Net.Security.BufferOffsetSize2& internalBuffer, Mono.Net.Security.AsyncOperation operation, Mono.Net.Security.BufferOffsetSize userBuffer, System.AsyncCallback asyncCallback, System.Object asyncState) [0x0000b] in /Users/builder/data/lanes/3969/44931ae8/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:307 
                              at Mono.Net.Security.MobileAuthenticatedStream.BeginRead (System.Byte[] buffer, System.Int32 offset, System.Int32 count, System.AsyncCallback asyncCallback, System.Object asyncState) [0x00000] in /Users/builder/data/lanes/3969/44931ae8/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/Mono.Net.Security/MobileAuthenticatedStream.cs:272 
                              at System.Net.Security.SslStream.BeginRead (System.Byte[] buffer, System.Int32 offset, System.Int32 count, System.AsyncCallback asyncCallback, System.Object asyncState) [0x00000] in /Users/builder/data/lanes/3969/44931ae8/source/xamarin-macios/_ios-build/Library/Frameworks/Xamarin.iOS.framework/Versions/git/src/mono/mcs/class/System/System.Net.Security/SslStream.cs:372 
                              at WebSocketSharp.Ext+<ReadBytesAsync>c__AnonStorey3.<>m__0 (System.IAsyncResult ar) [0x00031] in <7d8633e6c59e474f8b014bbb504c73b5>:0

Client is IOS application , everything works fine for just 2-3 minutes and then I need update my connection with server. Can you help me with some advise what I'm doing wrong.

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 WebSocketSharp.Ext.ReadBytesAsync and the SslStream/MobileAuthenticatedStream frames in the reported stack trace. Reproduce the iOS client disconnect after 2–3 minutes, then determine where the stream is closed and verify the connection remains usable or fails with a clearly handled error.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.