servicetalk
servicetalk copied to clipboard
Make `Single.concat(Publisher)` behavior consistent on cancel
Motivation:
Behavior of Single.concat(Publisher) is different compare to all other concat variants: Single.concat(Completable),
Single.concat(Single), Completable.concat(Completable), Completable.concat(Single), Completable.concat(Publisher), Publisher.concat(Completable), Publisher.concat(Single), Publisher.concat(Publisher). It does not subscribe to the next source to propagate cancellation if onSuccess is delivered after cancel.
Modifications:
- Make tests for all
concatvaliants consistent in regards to cancellation; - Modify
Single.concat(Publisher)behavior to subscribe in caseonSuccessis delivered aftercancel;
Result:
Behavior of Single.concat(Publisher) is consistent with all other concat variants.
Decided to open a PR now as it shouldn't cause merge conflicts with #2381.
@Scottmitch rebased after your changes, ready for review
@idelpivnitskiy - should we close this or do you still think we need this?