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

Unsubscribing should clear all data associated with that subscription. #1

Open
tannerpreiss opened this issue Jan 30, 2017 · 0 comments

Comments

@tannerpreiss
Copy link

If I do a listen:

CSKey deviceKey = CSKey.fromString("a.b.c");
Subscription subscription = csApp.listen(deviceKey)
    .subscribe(response -> Log.d("tag", response));

Then later I unsubscribe to that subscription:

deviceKey.unsubscribe();

Then the data at "a.b.c" changes a few times

Then I resubscribe to "a.b.c":

CSKey deviceKey = CSKey.fromString("a.b.c");
Subscription subscription = csApp.listen(deviceKey)
    .subscribe(response -> Log.d("tag", response));

In the subscribe callback for my new subscription I will receive the value at "a.b.c" at the time of my initial unsubscription, and then will also receive the current value at "a.b.c". I only want to receive the current value upon resubscription of a path.

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