Skip to content

doOnDispose / doOnLifecycle onDisposed action not being called #5264

Closed
@fqborges

Description

@fqborges

Maybe I am doing something wrong, but this just stopped working when I updated version from 2.01 to 2.07 and 2.08.

The doOnDispose and the doOnLifecycle onDisposed action are not being called.

Sample code:

    Observable.fromCallable(() -> "1")
            .doOnLifecycle(
                    disposable -> Log.i(TAG, "1:doOnSubscribe"),
                    () -> Log.i(TAG, "1:doOnDispose")
            )
            .subscribe()
            .dispose();

    Observable.fromCallable(() -> "2")
            .doOnSubscribe(disposable -> Log.i(TAG, "2:doOnSubscribe"))
            .doOnDispose(() -> Log.i(TAG, "2:doOnDispose"))
            .subscribe()
            .dispose();

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions