Skip to content

RxCommand from stream failed to dispose fully #44

@BK-BS

Description

@BK-BS

I'm creating a RxCommand from a stream with a timeout. After disposing the RxCommand the timeout still emits and an exception is thrown.

 var command = RxCommand.createFromStream(
     (_) => someBroadcastStream
     .timeout(Duration(milliseconds: 1000))
     .onErrorResume((e) => e.add('do something')));
   
   command();
   command.dispose();

Exception is thrown rx_command.dart line 642
It looks like the inputObservable is not closed on dispose, so it is still listening to emitted notifications (i.e. from the timeout exception). Should this subscription also be disposed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions