We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I am having an http server, that server returns a websocket address on a specific http request. Then my project connects to that websocket server.
When websocket disconnection happens, my project sends the HTTP request again gets the new websocket url. This retry logic was done like below.
private void Connect() { webSocket = new WebSocket(m_websocketUrl); webSocket.EmitOnPing = true; webSocket.OnOpen += WebSocketOpened; webSocket.OnClose += WebSocketClose; webSocket.OnMessage += WebSocketMessageReceived; webSocket.OnError += WebSocketError; webSocket.WaitTime = TimeSpan.FromSeconds(20); webSocket.OnClose += WebSocketClose; } private void WebSocketClose(object obj, WebSocketSharp.CloseEventArgs e) { Console.WriteLine("websocket closed"); Reconnect(); } private void Reconnect() { System.Threading.Thread.Sleep(1000 * 60); Console.WriteLine("Re Registering with Saved Request"); m_remoteClient.sentRegisterRequest(); // this function gets a new websocket url. }
But sometimes I can see websocket close failed with the following error and not able to track from where this is coming
08/23/2023 1:23:26|Error|WebSocket.close:0|One or more errors occurred. (A task was canceled.)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I am having an http server, that server returns a websocket address on a specific http request.
Then my project connects to that websocket server.
When websocket disconnection happens, my project sends the HTTP request again gets the new websocket url.
This retry logic was done like below.
But sometimes I can see websocket close failed with the following error and not able to track from where this is coming
The text was updated successfully, but these errors were encountered: