forked from apache/druid
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NettyHttpClient: Cleaner state transitions for handlers. (apache#12889)
The Netty pipeline set up by the client can deliver multiple exceptions, and can deliver chunks even after delivering exceptions. This makes it difficult to implement HttpResponseHandlers. Looking at existing handler implementations, I do not see attempts to handle this case, so it's also a potential source of bugs. This patch updates the client to track whether an exception was encountered, and if so, to not call any additional methods on the handler after exceptionCaught. It also harmonizes exception handling between exceptionCaught and channelDisconnected.
- Loading branch information
Showing
3 changed files
with
57 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters