forked from apple/servicetalk
-
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.
Completable#mergeDelayError(Publisher) and HTTP client control flow (a…
…pple#1336) Motivation: The HTTP client control flow merges the resule of the write Publisher (a Completable) and the read Publisher via Completable#merge(Publisher). However when offloading is enabled it is possible events will be delivered out of order which may result in dropped data/trailers. Modifications: - Introduce the Completable#mergeDelayError(Publisher) operator - Use new mergeDelayError(..) operator instead of merge(..) so that both streams must complete which ensures all the read data is delivered to the application before any errors. It is assumed that if the write Publisher fails that the read publisher will also fail due to transport failure. Result: No more dropped data/trailres on HTTP client due to write failure (e.g. connection closure) being delivered before read data due to offloading (e.g. not enough demand, subscription is offloaded, demand arrives after write error is already delivered).
- Loading branch information
1 parent
808ba23
commit 906d6cf
Showing
9 changed files
with
639 additions
and
53 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
Oops, something went wrong.