SingleAsPublisher hangs on subscribe(Subscriber) call
andrey-radchenko opened this issue · comments
Andrey Radchenko commented
The subscribe(Subscriber s)
method calls s.onSubscribe(...)
, which in turn calls request(n) and goes into infinite loop waiting for wrapped single to complete. But actual Single
has not been subscribed to yet and therefore infinite loop will never end.
@Override
public void subscribe(Subscriber<? super T> s) {
SingleAsPublisherSubscriber<T> parent = new SingleAsPublisherSubscriber<T>(s);
s.onSubscribe(parent); // apparently, this goes into infinite loop and never returns
single.subscribe(parent);
}
David Karnok commented
Fixed via #156