Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unhandled WebSocketException #422

Closed
JustArchi opened this issue Aug 2, 2017 · 2 comments
Closed

Unhandled WebSocketException #422

JustArchi opened this issue Aug 2, 2017 · 2 comments
Assignees
Labels
Milestone

Comments

@JustArchi
Copy link
Contributor

Looks similar to #420 - I think this should also be handled in SK2 internals, thanks!

Ref: JustArchiNET/ArchiSteamFarm#586 (comment)

2017-08-01 19:25:42|dotnet-3114|FATAL|ASF|OnUnhandledException() System.Net.WebSockets.WebSocketException (0x80004005): The remote party closed the WebSocket connection without completing the close handshake. ---> System.IO.IOException: Unable to transfer data on the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer
   --- End of inner exception stack trace ---
   at System.Net.Security.SslStreamInternal.EndRead(IAsyncResult asyncResult)
   at System.Net.Security.SslStream.EndRead(IAsyncResult asyncResult)
   at System.Threading.Tasks.TaskFactory`1.FromAsyncTrimPromise`1.Complete(TInstance thisRef, Func`3 endMethod, IAsyncResult asyncResult, Boolean requiresSynchronization)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Runtime.CompilerServices.ConfiguredTaskAwaitable`1.ConfiguredTaskAwaiter.GetResult()
   at System.Net.WebSockets.ManagedWebSocket.<EnsureBufferContainsAsync>d__70.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at System.Net.WebSockets.ManagedWebSocket.<ReceiveAsyncPrivate>d__61.MoveNext()
   at System.Net.WebSockets.ManagedWebSocket.<ReceiveAsyncPrivate>d__61.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SteamKit2.WebSocketConnection.WebSocketContext.<ReadMessageAsync>d__14.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SteamKit2.WebSocketConnection.WebSocketContext.<RunCore>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at SteamKit2.WebSocketConnection.WebSocketContext.Dispose()
   at SteamKit2.WebSocketConnection.DisconnectCore(Boolean userInitiated, WebSocketContext specificContext)
   at SteamKit2.WebSocketConnection.Send(Byte[] data)
   at SteamKit2.Internal.CMClient.Send(IClientMsg msg)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.TimerQueueTimer.CallCallback()
   at System.Threading.TimerQueueTimer.Fire()
   at System.Threading.TimerQueue.FireNextTimers()
@yaakov-h yaakov-h added this to the 2.0.0 milestone Aug 2, 2017
@yaakov-h yaakov-h added the bug label Aug 2, 2017
@yaakov-h yaakov-h self-assigned this Aug 2, 2017
@yaakov-h
Copy link
Member

yaakov-h commented Aug 2, 2017

New alpha published, try that out and let us know how it goes.

Unfortunately I can't find any documentation (or obvious code in corefx or referencesource) to see what exceptions SendAsync and RecieveAsync can throw, so it's going to be a bit of whack-a-mole.

@JustArchi
Copy link
Contributor Author

It's fine, this is the least I can do to say thanks for using your awesome library 👍. I'll keep reporting what I see worthy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants