These are chat archives for ReactiveX/RxJava

27th
Dec 2017
Thomas May
@cogman
Dec 27 2017 21:42

Is this a bug? I would have expected this to eventually terminate but it never does

    ConnectableFlowable<Integer> publish = Flowable.just(1)
            .publish();

    Disposable subscribe = publish.subscribe((e)->System.out.println(e));
    publish.connect();
    publish.blockingSubscribe();

This is the latest rxJava

David Karnok
@akarnokd
Dec 27 2017 23:07
You deadlock because the publish completed and is awaiting for the next connect() call. Otherwise, it is a shortcoming of the ConnectableX API we aim to fix in 3.x: ReactiveX/RxJava#5628
Thomas May
@cogman
Dec 27 2017 23:17
What would be the proposed behavior of this in 3.0? Would the post connect subscriber just get a onComplete/onError if the publisher is finished or would it get something else?