-
-
Notifications
You must be signed in to change notification settings - Fork 262
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
SignalRClient.start()
may get stuck on keepalive timeout and closed TCP connection
#628
Comments
Hello @theOehrly ! When I tried to run SignalRClient with timeout, after receiving an error and the timeout time has expired, the function client.start() was stucked in loop
Apparently, since the connection has already been closed due to the error that occurred, the For another example, you can add these lines to the received message handler. If only the In normal conditions after
And when
So as I understand this bug can be fixed by adding Hope it helps! |
@supremeremixx thank you for investigating this more. This is helpful information, for sure. Maybe I'll be able to fix it soon. Also, it would probably be best to raise an exception here instead of simply returning from the function. After all, this is not an intended or expected way to close the connection, but rather it is some sort of connection error. |
Discussed in #627
Originally posted by supremeremixx August 19, 2024
Hello!
I'm trying to run endless loop with SignalRClient.
After random amount of time (3, 5 , 11 hours...) I get keepalive timeout error. In logs I see that TCP connection is closed, but function client.start() still blocked, it never ends. Loop is never finished and that's why program not creating a new client instance after error.
I've tried running it with and without timeout (in SignalRClient), but the function remains locked.
Is it possible to somehow terminate it after receiving an error?
The text was updated successfully, but these errors were encountered: