Skip to content

Observables with shareReplay(1) - being re-evaluated when refCount becomes 0 #2908

@shinok01

Description

@shinok01

RxJS version:
v5.4.2

Code to reproduce:
https://plnkr.co/edit/ZInWDJSuzfKEvtEOUBir?p=preview
Uncomment the call to subscribe to reproduce the issue

Expected behavior:
shareReplay(1) subjects should not be torn down when refCount becomes 0.

Actual behavior:
When refCount becomes 0, the underlying subject is torn down, causing the observable to be re-evaluated when the next subscription is registered.

Additional information:

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugConfirmed bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions