RxJS version: 5.0.0-beta.6
Code to reproduce:
Rx.Observable
.fromPromise(new Promise((res) => res(true)))
.map(() => 'abc')
.do(() => console.log('LOG_1'))
.cache()
.do(() => console.log('LOG_2'))
.flatMap(() => Rx.Observable.timer(500)
.flatMap(() => Rx.Observable.throw('ERR')))
.retry(3)
.subscribe(() => {})
Expected behavior: LOG_1 should happen once and LOG_2 four times:
LOG_1
LOG_2
LOG_2
LOG_2
LOG_2
Similarly to:
Rx.Observable.timer(1000)
.map(() => 'abc')
.do(() => console.log('LOG_1'))
.cache()
.do(() => console.log('LOG_2'))
.flatMap(() => Rx.Observable.timer(500)
.flatMap(() => Rx.Observable.throw('ERR')))
.retry(3)
.subscribe(() => {})
Actual behavior: LOG_1 appears four times, moreover after retry the order of logs is reversed.
LOG_1
LOG_2
LOG_2
LOG_1
Uncaught ObjectUnsubscribedError
LOG_2
LOG_1
Uncaught ObjectUnsubscribedError
LOG_2
LOG_1
Uncaught ObjectUnsubscribedError
Additional information: Both code snippets generate: Uncaught ObjectUnsubscribedError after each retry. demo
By any chance did anyone take a look at it? Is it a bug or am I doing something wrong?
I'll look into this very soon.
Just wonder if it may be _somehow_ connected to: #1466.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
I'll look into this very soon.