Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sample/throttleLast doesn't call unsubscribe #1958

Closed
zsxwing opened this issue Dec 12, 2014 · 0 comments
Closed

sample/throttleLast doesn't call unsubscribe #1958

zsxwing opened this issue Dec 12, 2014 · 0 comments

Comments

@zsxwing
Copy link
Member

zsxwing commented Dec 12, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant