Open elmurci opened 1 year ago
I considered this before, indeed, and to keep it simple I left it. But I agree. The best way to deal with this is to "diff" subscriptions and let 2 cancel out 1 if equal. This would be tricky (not impossible) when users e.g. subscribe to certain accounts and then unsubscribe to a part of them.
Would you like a PR for this?
Would you like a PR for this?
Who would say no to that 🎉 PR for an issue/challenge/shortcoming/... is the dream of an open source maintainer :D
(Not a bug a such, but a thought I would like to share for discussion)
The library persists a
subscriptions
array that is helpful in case of connection loss so we can keep the "state".In some cases, we might want to remove certain entries from the array as they become obsolete.
For example, in the following flow:
create
request for Aclose
request for Acreate
request for BEven if A is not longer a path we want to explore, the
path_find
request gets created and closed (before path find request B) on every reconnection meaning we will receive some path messages for it for a few seconds.