Closed
Description
This snippet
val sub = ReplaySubject[Int]()
sub.onNext(1)
sub.onNext(2)
sub.onError(new Exception("Kabloooy!")) // Gets moved to after onNext(3)
sub.onNext(3)
sub.subscribe(
n => println("sub1: " + n),
e => println("sub1: " + e.getMessage),
() => println("sub1: completed")
)
println("done")
outputs
sub1: 1
sub1: 2
sub1: 3
sub1: Kabloooy!
done
but I would expect
sub1: 1
sub1: 2
sub1: Kabloooy!
done
since items received after onError should not be emitted by ReplaySubject.
(Thank you Dragisa Krsmanovic for pointing this out)
Metadata
Metadata
Assignees
Labels
No labels