-
Notifications
You must be signed in to change notification settings - Fork 98
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
Dispatch event when connection is terminated #150
Conversation
Can see #91 |
@michaelnabil230 But we have no way to find out if the connection is closed or not. (or at least I couldn't) |
@joedixon |
Ummmm 🤨 But if the has event when close the socket why don't have event when socket is starting? |
Thanks @AmirRezaM75 for the pull request. I don't want to add any more events right now as they expose the potential to block the event loop and increase memory and CPU usage.
Right now, you would have to use a PresenceChannel to achieve this. |
@joedixon
|
Can you have a general channel. For instance, in my demo, I had a |
@joedixon Not sure is it a good idea to have one channel for handling presence for the entire app. because everyone can understand how many people are online in your website. Also I found this in pusher documentation
I don't know is it true for reverb or not!? As I said the solution works for group, workspace etc. But for friend list (followers) like discord, telegram; doesn't work. because they are not part of one specific channel. I understand your concerns about "blocking the event loop", but in my opinion we can't stop user from misusing the system. Anyone that goes deep like this, probably know about consequences. Anyway the ball is in your court :) |
Hi,
I couldn't find a way to detect when connection is closed on private channel. Either by closing the browser tab or using 'pusher.disconnect()'.
The message is simply logged here:
reverb/src/Protocols/Pusher/Server.php
Line 84 in 0b337be