EmitterProcessor queue not cleared on immediate cancellation #3359
Labels
area/doOnDiscard
This belongs to the doOnDiscard theme
help wanted
We need contributions on this
type/bug
A general bug
Milestone
EmitterProcessor#remove
has support to discard the buffer once the last subscriber is gone. However, it returns early if the subscribers array is alreadyEMPTY
. For cases where the subscription is immediately cancelled (e.g..take(0)
) this may leak the buffered elements.Here is a repro case:
As a workaround
.takeWhile(x -> false)
does make the test pass for example.The text was updated successfully, but these errors were encountered: