urish/muse-js

question about unsubscribing

Closed this issue · 1 comments

Hey,

Not an issue, just a question. I've noticed the Client doesn't have an "unsubscribe" function - is that automatic on disconnect()? I ask because I'm going to be using it in an office setting, so I want to make certain Person A's dataset doesn't accidentally get mixed with Person N's.

urish commented

Yes, this is handled by the observableCharacteristic helper method - you can see it also listens for device disconnect events, and closes the subscription as soon as one is emitted.