-
Notifications
You must be signed in to change notification settings - Fork 14
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
fix: only attempt to subscribe/unsubscribe to channels when socket id is set #6
fix: only attempt to subscribe/unsubscribe to channels when socket id is set #6
Conversation
nicobritos
commented
Aug 3, 2022
- Only attempt to subscribe to a private channel if socket id is set, as it is necessary for authenticating a private channel on the server side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well done, @nicobritos. Thank you very much!
I think, the same should be done on Public Channels |
Checking if [connectionDelegate.socketId] is set on both subscription and unsubscription of both type of Channels |
@nicobritos , Please have a look at the latest changes to the branch. If it's ok, I will merge it to master. |
@Mcfugger yeah, I think it's OK. I didn't notice but unsubscribing a channel when the socket id is null (therefore, the connection has been closed) makes no sense, so I think it ok. |
Actually, it does make sense - it may be waste calls to the server even it ignores them |