reuse restartable
Suhinin opened this issue · 3 comments
Hi! How can I reuse restartable with safe previous callbacks? If I'm restart restartable when onNext or onError not going yet (post response with timeout), after restart they will not be happen never.
Solved problem by replace my restartableFirst(...) and start(restartableFirstId) by (pseudocode) :
add(MyObserable.compose(deliverFirst).subscribe(split(onNext, onError)))
and calling this line every time when I want.
It is correct decision? I must remove subscription from subscriptions list after it complete?
Hi, I do not quite get what is your problem. Observable gets recreated every time you call start
, so it should propagate onError
as usual.
I tried to send some message using your library. So I don't want to recreate observable every time when call start method, because answer from previous call may not be obtained yet (e.g. slow internet connection)
Without recreating restartable observables you will not be able to change their arguments.