Skip to content

Cancellation signal not propagated to upstreams of mergeSequential #1500

Closed
@gpod

Description

Expected behavior

All Monos are cancelled in the code below.

Actual behavior

The first Mono is not cancelled.

Steps to reproduce

Run the following code

@Test
public void cancellingSequentiallyMergedMonos() {
    final Flux<Object> merge = Flux.mergeSequential(
            Mono.never().doOnCancel(() -> System.out.println("Cancelling 1")),
            Mono.never().doOnCancel(() -> System.out.println("Cancelling 2")),
            Mono.never().doOnCancel(() -> System.out.println("Cancelling 3")),
            Mono.never().doOnCancel(() -> System.out.println("Cancelling 4")),
            Mono.never().doOnCancel(() -> System.out.println("Cancelling 5")));

    merge.subscribe().dispose();

    // Cancelling 1 is never printed
}

Reactor Core version

Californium-SR4

JVM version (e.g. java -version)

openjdk version "11" 2018-09-25

https://gitter.im/reactor/reactor?at=5c505f37b6953b1be794b4c0

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions