Skip to content
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

Flood of error messages when connection closes #157

Closed
sander2 opened this issue Nov 6, 2020 · 4 comments
Closed

Flood of error messages when connection closes #157

sander2 opened this issue Nov 6, 2020 · 4 comments

Comments

@sander2
Copy link

sander2 commented Nov 6, 2020

When the connection is closed (because e.g. the server shuts down), there is an unending flood of these messages:

ERROR jsonrpsee::client] Client Error: Inner(Ws(Closed))

It would be nice if this error was handled a bit more graciously.

@niklasad1
Copy link
Member

niklasad1 commented Nov 6, 2020

Indeed, it's on the checklist for releasing v2 also described in #67

Currently, when an error is received it's just logged and not propagated to the user because in most cases it's not possible to determine which request failed because it's mapped per request id, as in the JSONRPC v2 spec.

Thus, I think the proper way is just to terminate the connection when an error is received on the connection (with the error to user)

Thoughts?

@sander2
Copy link
Author

sander2 commented Nov 6, 2020

In the case of an unrecoverable error like a closed connection I think it should definitely be propagated to the user. I am not sure what should happen when an error occurs that is only effecting one request, but just ignoring it probably isn't a good idea, as I imagine it could lead to unexpected program freezes

@alannotnerd
Copy link

+1

@niklasad1
Copy link
Member

Fixed by #180, the error message could be improved though.

I will open another issue for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants