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
SignalR .net client connects and disconnects immediately endlessly #3813
Comments
Once disconnected the client should not try to connect automatically. I guess you try to restart your client from the closed event. Can you show your code? Also, did you configure any timeouts on the server side? |
Yes, I have a closed event handler - Retry() - which restarts the client.
No, I haven't changed any timeouts. They are all default values. So there is a HTTP connection to the hub while the client immediately disconnects after making the connection. I changed the title of this posting to reflect the fact that the issue is the immediate disconnect after making the connection - not the reconnect itself as I am the one manually making it. |
What do you do in |
Here is the extension method.
Earlier I had task1.Wait() in a try/catch but chose to go with the ContinueWith(). |
Is the trace from the time where you have |
Unfortunately, I don't have the trace from when I had the Are you suggesting the |
Because you don't wait for the task to finish your code continues to run while the connection is being started so you might be running code not intended to run when the connection is not connected. |
Signalr .net client 2.2.1.0 on a windows server 2008 with .NET 4.0
Signalr server 2.2.1.0 on a windows 2012 server with .NET 4.5.
I start the client passing in the SSE as the client protocol and attach a ContinueWith() for exception handling. Sometimes the client goes into endless connect, immediate disconnect, reconnect, immediate disconnect loop.
While this is going on, the server is pushing data to the client without any issues. But the client is unable to respond back to the server and my UnobservedTaskException handler kicks in and logs:
From this point on, the client endlessly connects, immediately disconnects, reconnects, immediately disconnects, and so on.
The log above is continuously repeated until the client is restarted. Read some of the posts regarding this issues here and on StockOverFlow. All seem to suggest it was fixed in an earlier release than 2.2.1.0 but I am running into the same issue (I assume). Thanks
The text was updated successfully, but these errors were encountered: