Closed imhazige closed 5 years ago
first time, it work.
then logout, login again, sub the seconds time with the same server object.
the seconds time
I noticed the _nosub, what's that mean?
@Gregivy please help
Hello @imhazige! I was not able to reproduce this error, can you show me the example code, please?
ok, can you send me your gitlab account, I will add you to the project. my gtalk is imhazige, hope I can connect to you.
'_nosub' means that server responded with error or unsubscribed you if its value is true
the code is connecting to the dev server, which is working for a long time, so I think the server have no problem.
I have add you to the project, @Gregivy
https://github.com/imhazige/meteor-ddp-client-test/invitations
I have add the README.md
So you manually login, then logout, then login again and subscription does not work. From your logs I see that subscriptionId
is the same in both cases which means that you have not tried to restart the subscription. When you logout the server sends nosub
message, so simpleddp stops the subscription but the ddpSubscription
object is not destroyed. Next time you login you try to subscribe with the same parameters, simpleddp sees that and does nothing but return you your previous subscription (which is stopped). I think I can improve this behavior and in next simpleddp releases your code will work. For now you should remove your subscription when your home page dies.
@Gregivy Thanks, I will have a try now, I have tried remove yesterday, still not work. I will try restart.
Instead of let userSub = server.subscribe("account.info");
put subscription in some page variable, then use destroyed
hook in your home.vue component and do something like this
this.userSub.remove();
this.userSub = null;
ok
On Sat, Aug 10, 2019 at 9:18 AM Gregivy notifications@github.com wrote:
Instead of let userSub = server.subscribe("account.info"); put subscription in some page variables, then use destroyed hook in your home.vue component and do something like this
this.userSub.remove(); this.userSub = null;
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Gregivy/simpleddp/issues/11?email_source=notifications&email_token=AA7OSFQYL4DBDGIOTYTDHQTQDYJPPA5CNFSM4IKSJ352YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD4ADCJA#issuecomment-520106276, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7OSFXRJOSBBWM625O3DMLQDYJPPANCNFSM4IKSJ35Q .
It works! thank you so much! @Gregivy
You are welcome :)
I have tried sub and subscribe, the first time, it will work.
then the seconds time, will never trigger the ready state.
I have used the login plugin.