Skip to content

sample/throttleLast doesn't call unsubscribe #1958

@zsxwing

Description

@zsxwing

In the following code, I would expect the "cleanup" message to be printed three times, but on the last case (o1.throttleLast(...)) it isn't.

 def o = rx.Observable.create({ subscriber ->
        subscriber.add(Subscriptions.create({ println "cleanup" }))
    })

    o.subscribe({})
        .unsubscribe() // prints

    o.take(1)
        .subscribe({})
        .unsubscribe();  // prints

    o.throttleLast(1, TimeUnit.MILLISECONDS)
        .subscribe({})
        .unsubscribe() // doesn't print

Reported by juanedi in http://stackoverflow.com/questions/27428757/unsubscriptions-not-cascading-back-to-base-observable-in-rxjava

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