-
Notifications
You must be signed in to change notification settings - Fork 999
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
swarm/src/toggle: Ignore listen upgr errors when disabled #1945
Conversation
A disabled `ToggleProtoHandler` can receive listen upgrade errors in the following two cases: 1. Protocol negotiation on an incoming stream failed with no protocol being agreed on. 2. When combining `ProtocolsHandler` implementations a single `ProtocolsHandler` might be notified of an inbound upgrade error unrelated to its own upgrade logic. For example when nesting a `ToggleProtoHandler` in a `ProtocolsHandlerSelect` the former might receive an inbound upgrade error even when disabled. `ToggleProtoHandler` should ignore the error in both of these cases.
In case this patch finds approval, I would like to relase |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 Feel free to cut releases after merging.
I planned to only publish a new |
Not necessarily. I only used plural in case you think it would be desirable to have a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
A disabled
ToggleProtoHandler
can receive listen upgrade errors in thefollowing two cases:
Protocol negotiation on an incoming stream failed with no protocol being
agreed on.
When combining
ProtocolsHandler
implementations a singleProtocolsHandler
might be notified of an inbound upgrade error unrelated to its own upgrade
logic. For example when nesting a
ToggleProtoHandler
in aProtocolsHandlerSelect
the former might receive an inbound upgrade erroreven when disabled.
ToggleProtoHandler
should ignore the error in both of these cases.Fixes paritytech/polkadot#2373.