socket.io-client-csharp icon indicating copy to clipboard operation
socket.io-client-csharp copied to clipboard

Unhandle Exception on Latest Lib 3.0.3

Open ankur4747github opened this issue 3 years ago • 4 comments

CoreCLR Version: 4.700.21.26205 .NET Core Version: 3.1.16 Description: The process was terminated due to an unhandled exception. Exception Info: System.Threading.Tasks.TaskCanceledException: The operation was canceled. at System.Net.Http.ConnectHelper.ConnectAsync(String host, Int32 port, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.ConnectAsync(HttpRequestMessage request, Boolean allowHttp2, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.CreateHttp11ConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.GetHttpConnectionAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.Http.HttpConnectionPool.SendWithRetryAsync(HttpRequestMessage request, Boolean doRequestAuth, CancellationToken cancellationToken) at System.Net.Http.RedirectHandler.SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) at System.Net.WebSockets.WebSocketHandle.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken, ClientWebSocketOptions options) at System.Net.WebSockets.ClientWebSocket.ConnectAsyncCore(Uri uri, CancellationToken cancellationToken) at SocketIOClient.Transport.DefaultClientWebSocket.ConnectAsync(Uri uri, CancellationToken cancellationToken) at SocketIOClient.Transport.WebSocketTransport.ConnectAsync(Uri uri) at SocketIOClient.Transport.TransportRouter.ConnectByWebsocketAsync() at SocketIOClient.Transport.TransportRouter.ConnectAsync() at SocketIOClient.SocketIO.ConnectAsync() at SocketIOClient.SocketIO.ConnectAsync() at SocketIOClient.SocketIO.InvokeDisconnect(String reason) at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__139_1(Object state) at System.Threading.QueueUserWorkItemCallback.<>c.<.cctor>b__6_0(QueueUserWorkItemCallback quwi) at System.Threading.ExecutionContext.RunForThreadPoolUnsafe[TState](ExecutionContext executionContext, Action`1 callback, TState& state) at System.Threading.QueueUserWorkItemCallback.Execute() at System.Threading.ThreadPoolWorkQueue.Dispatch()

ankur4747github avatar Oct 08 '21 13:10 ankur4747github

It looks like an error occurred when connecting to the websocket server. Can you use fiddler to monitor the response of the websocket?

doghappy avatar Oct 10 '21 06:10 doghappy

it's not reproducible.. is there a way that you handle this error in your lib and handle it internally ?... because of this error my application crashed... I already using try-catch but still, my application crashed .. need a solution for the application that crashed..

ankur4747github avatar Oct 10 '21 12:10 ankur4747github

After SOCKET DIS-CONNECT= transport close my application crashed

ankur4747github avatar Oct 14 '21 08:10 ankur4747github

Please show stack info

doghappy avatar Oct 14 '21 09:10 doghappy