-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not cancel subscription on BlockingIterable#hasNext(long, TimeUnit)
This makes sure that if this method, or in extend next(long, TimeUnit) is called and times out, the caller is able to retry the operation and also the upstream source will not be cancelled. In the context of a Blocking Streaming server, this means that if a timeout is thrown on the incoming request, the outgoing response can still be modified since the underlying socket will not be immediately closed. It also aligns the semantics with Single#toFuture where a blocking get with a timeout on the future also does not cancel the upstream Single. A (temporary) system property is introduced which allows to fall back to the old behavior should incompatibilities be discovered in the wild. A note for the reader who wonders how to close the subscription now: the close() method always did cancel the subscription and continues to do so.
- Loading branch information
Showing
3 changed files
with
26 additions
and
10 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