Wahib Ul Haq
1 min readDec 25, 2017

--

I have a question related to “Disconnecting” and “Reconnecting”.

I was following this resource https://github.com/Froussios/Intro-To-RxJava/blob/master/Part%203%20-%20Taming%20the%20sequence/6.%20Hot%20and%20Cold%20observables.md#disconnecting and somehow seems like RxJava2 doesn’t follow the same behaviour.

Everything is find as far as you have shown but what if I do this.

Disposable disposableUser = users.connect()
then I do disposableUser.dispose().

Later, if I do users.connect() again, the subscribed Observers won’t receive any emissions if there were any. It does work if I subscribe again after dispose().

Am I missing something from RxJava2 perspective?

--

--

Wahib Ul Haq
Wahib Ul Haq

Written by Wahib Ul Haq

Senior Program Manager at Diconium • Dev Advocate • Talks about Tech, DevRel, Soft skills, Careerintech & Partnerships • Co-Organizer @DevRelMunich

No responses yet