-
Notifications
You must be signed in to change notification settings - Fork 949
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
Review the design of the OneShotHandler disconnecting in case of protocol error #1530
Comments
Ok I'm stupid. This is actually how it's been designed, as it makes it possible for the protocol to force-close the connection. You are expected to pass a |
This, however, is a legitimate case where you might not want to force-close the connection. |
At the moment I'd lean towards deprecating the |
In my experience, The problem with composing several The separation into |
|
Closing in favor of #3591. |
When an error happens when upgrading an outbound request, the
OneShotHandler
straight up closes the connection.Errors can happen because of a protocol error (e.g. multistream-select received bad data), in which case this behaviour makes sense.
But errors can also for a variety of reasons, such as if the requested protocol isn't supported by the remote, or the remote wants to send us a response that is too large, in which case closing the connection is too aggressive.
We should in my opinion instead propagate any error to the behaviour.
The text was updated successfully, but these errors were encountered: