-
Notifications
You must be signed in to change notification settings - Fork 129
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
Using the UnsubscribeFunc for different collections results in an error #204
Comments
Please don't post code as screenshots as it is hard to read and follow. For code blocks you can use tripple backticks ("`"). Could you provide a minimal reproducuble repo or at least steps to consistently reproduce? The above error indicates that the realtime client was already disconnected (or the locally stored client id has changed, but there is not enough context to understand where your code is executed) probably due to the async nature of the calls. You can either ignore the error or await the unsubscribe calls. |
Sorry I was brain-dead, never attached code screenshots ever before in an issue 🤦 |
The unsubscribe functions are async. What probably is happening in your case is something like:
What we can eventually do I guess is on |
I've pushed a fix in v0.15.1 release as the refactoring may take a while since currently the Go internals refactoring and the JS app hooks integration are with higher priority. |
Wow, that was fast, thanks a lot 👍 |
Using the returned
UnsubscribeFunc
from thesubscribe(...)
for two different collections results in the following error:for the second call of the
UnsubscribeFunc
.This is my wrapper function for the real-time events in my
accounts.service.ts
:This is my
onMounted
-Hook in myView
file:This is my
onUnmounted
-Hook in myView
file:Not calling each
UnsubscribeFunc
results in duplicate fired events on navigation change - so it has to be required.The text was updated successfully, but these errors were encountered: