Skip to content

concatMap() invokes inner.cancel() after inner has signaled onComplete() #6259

@ylecaillez

Description

@ylecaillez

Reproduced with RxJava version: 2.1.9 and 2.2.3.

Flowable.just(Boolean.TRUE)
        .repeat()
        .concatMap(token -> Flowable.just("foo").doOnCancel(() -> System.out.println("Cancelled")))
        .subscribe();

Expected behavior: "Cancelled" should not appear on the console
Current behavior: "Cancelled" is printed as a result of cancel invocation.

Note that flatMap(token -> ..., 1) don't have this issue but it is significantly slower than concatMap()

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions