-
Notifications
You must be signed in to change notification settings - Fork 500
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
Websocket connection never cleaned up on connect() causing unrecoverable loop #1185
Comments
Here is a proposed solution #1186 |
hey @nickewansmith, thanks for filing this! This logic is definitely tricky, so I want to make sure I understand your issue & the reproduction example and give some context:
Does that make sense? If I'm missing something / you are still seeing unexpected behavior, let me know. |
Hey, np @FredKSchott. What you've explained is correct, however, because the try/catch in question is run before the |
Ah, you're right! Thanks for filling in that missing bit. Okay, let's discuss solutions in #1186 since I think that PR is on the right track. |
It seems that if Connection
_subscribeToLedger
throws onconnect()
that Connection_ws
is never cleaned up due to the cleanup code inconnect()
->_ws.once('close')
never actually being reached due to returning immediately on throw.This can be reproduced in this way:
The text was updated successfully, but these errors were encountered: