-
Notifications
You must be signed in to change notification settings - Fork 194
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
Untreated error callbacks when using websockets #361
Comments
Hey @bvanelli i'm seing the same error with the websocket that you reported under some conditions:
|
@Rajiv91 Which version are you using? Do you have some short code describing the issue? Also, it is a known issue that if you have an error callback that raises an exception, it could cause problems you described. |
Hi @bvanelli thanks for your reply.
So I am receiving and parsing the "PING" and "PONG" fine from the nats server, but randomly the other side instead of send me the bytes it sends me an int=1001 which makes the parse throw an error but due to it's a type error it falls in:
Printing:
|
@Rajiv91 I believe I solved it on my MR: https://github.com/nats-io/nats.py/pull/375/files There, I added a check for the disconnect cause. This should solve the issue you are describing. Let me know if it helps. |
Turns out some errors are not handled and show full traceback when using websockets. For example this one, when I restart the nats server:
Or this one, that I could not reproduce but I guess is related to reconnect:
If anyone finds more of those please append to the issue.
I'll submit a merge request once I do more testing and find more edge cases.
The text was updated successfully, but these errors were encountered: