-
Notifications
You must be signed in to change notification settings - Fork 733
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
Catch random crash when notifying the client #1022
base: master
Are you sure you want to change the base?
Conversation
Thanks. I've done the wrapping in a separate function, and logged as an exception not error. |
@kyuupichan WIth your fix, the crash still takes place if you run artillery with the following config:
Whereas with our fix, it doesn't crash, logs out the error, closes the connection, but no crash (which is we want to achieve after all, not random crashes of ElectrumX). I think |
connection_lost() is supposed to be a notification from the (in this case) websocket code that the connection was lost. It isn't right to call it directly IMO. Something isn't right either in the websocket code or how I'm using it, but I have no idea what is wrong. It's noticeable this doesn't happen in the normal TCP socket case. |
@kyuupichan I added it, in your code, with the
I rerun your code without So I think that the issue is in your external function, the
Then it works just like my code, shows errors, but continues serving, nor crashing nor closing its servers so becoming unresponsive. |
cce04c0
to
1379529
Compare
Catch for random error when Electrumx wants to notify a client and it fails, causing the ElectrumX to crash, associated with #966 .