Open Sawtaytoes opened 3 years ago
hmm, it currently isn't possible i could think of a couple of solution to solve this
const ctrl = new AbortController()
const {signal} = ctrl
wemoClientDiscover(cb, { signal })
const listener = wemoClientDiscover(cb)
listener.stop()
it would also be cool to do something like
for await (const device of wemoClientDiscover({ signal })) {
// ...
}
When calling
wemoClient.discover
, how do I unsubscribe?