Closed drweeto closed 6 years ago
I have the exact same issue, same version, same everything.
Similar issue for me:
WebSocket4Net: 0.15.0
Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object. at WebSocket4Net.Protocol.DraftHybi10Processor.SendMessage(WebSocket websocket, Int32 opCode, String message) at WebSocket4Net.WebSocket.OnDataReceived(Byte[] data, Int32 offset, Int32 length) at SuperSocket.ClientEngine.AsyncTcpSession.ProcessReceive(SocketAsyncEventArgs e) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()System.NullReferenceException: Object reference not set to an instance of an object. at WebSocket4Net.Protocol.DraftHybi10Processor.SendMessage(WebSocket websocket, Int32 opCode, String message) at WebSocket4Net.WebSocket.OnDataReceived(Byte[] data, Int32 offset, Int32 length) at SuperSocket.ClientEngine.AsyncTcpSession.ProcessReceive(SocketAsyncEventArgs e) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.QueueUserWorkItemCallbackDefaultContext.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem() at System.Threading.ThreadPoolWorkQueue.Dispatch()
Ok, I will get time to check this issue.
Could you try the new released version? https://www.nuget.org/packages/WebSocket4Net/0.15.1
Thank you very much! I should be able to try it out in parallel with the old version this week. I will post up how it goes if no one else gets back to you before me.
Apologies for the delay. The new version seems to fix the reported error. Thank you very much for providing the update. I will close this issue now.
The following exception was raised recently:
My websocket connection was closed (from the target end), triggering the Closed event. I then disposed of the websocket object and created a new websocket object. This time, the websocket could not reach the target (HTTP 520 Origin Error), the Closed event triggered. I disposed the websocket object again and then recreated the websocket, this time it did connect. But then a few seconds later my program crashed.
Are you able to tell if this is something I've caused? Perhaps I am doing something wrong regarding disposal of websocket objects.
WebSocket4NET: v0.15.0 SuperSocket.ClientEngine.Core: v0.8.0.13