-
Notifications
You must be signed in to change notification settings - Fork 722
Add errorCaught to NIOTypedHTTPClientUpgradeHandler #3210
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
Conversation
To handle errors fired by previous ChannelHandlers. Otherwise if they fail the error returned is `inappropriateOperationForState` which is not very informative.
68bbb20 to
a28c442
Compare
Lukasa
left a comment
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.
One minor nit, otherwise this looks really good.
| } | ||
| } | ||
|
|
||
| public func errorCaught(context: ChannelHandlerContext, error: any Error) { |
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.
We should probably fire the error on as well, to avoid breaking any systems that were relying on this.
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.
done
|
Looks like we have some test failures here. |
Head branch was pushed to by a user without write access
Ah yeah forwarding the error means |
To handle errors fired by previous ChannelHandlers. eg NIOSSLClientHandler
Motivation:
Otherwise if a ChannelHandler previous to the upgrade ChannelHandler fails the error returned is
inappropriateOperationForStateand the error fired by the original ChannelHandler is lost.Added
testReturnsErrorsFromPriorChannelHandlers. Also had to reorganisesetUpClientChannelslightly so I could get the result of the upgrade.