-
Notifications
You must be signed in to change notification settings - Fork 183
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
TimeoutHttpRequesterFilter
as a connection filter causes `ClosedCha…
…nnelException` (#2263) Motivation: If applied as a connection-level filter, it skips the logic defined in `LoadBalancedStreamingHttpClient` for the cancellation. Cancel will be scheduled on the event-loop, then `onError` is propagated. `LoadBalancedStreamingHttpClient` will mark the request as finished, it won’t see cancel. As the result, the same connection can be selected for another request, and users see `ClosedChannelException`. Modifications: - For `StreamingHttpConnectionFilterFactory` variant used for HTTP/1.X connections, apply `BeforeFinallyHttpOperator` with `cancel` callback similar to `LoadBalancedStreamingHttpClient`; - Enhance mocks to account for new behavior; - Move the common logic of extracting a fallback executor as a static method in `AbstractTimeoutHttpFilter`; Result: HTTP/1.X requests don't fail with `ClosedChannelException` if a previous request on the same connection times out.
- Loading branch information
1 parent
7071632
commit d3d4667
Showing
5 changed files
with
74 additions
and
30 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
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