-
Notifications
You must be signed in to change notification settings - Fork 105
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
iOS/Mobile Safari: onLeave not triggering in the client-side #100
Comments
Josh just shared his reproduction case here https://github.com/jorasso/colyseus-examples
|
This functionality seems to be working fine in Chrome/Windows. I will investigate in Safari/Mac. |
Hi @endel,
|
Hi @lpsandaruwan, I see your video and I think by clicking on "disconnect" does not have the same effect as fully disconnecting from the wi-fi network as described by Josh
|
Hey y'all! I have a little more information on this. It looks like the disconnection detection is only occurring on the server. Visit here and scroll down just a bit as it lists steps to detect disconnects on the client. However, looking at the Websocket Transport, there currently isn't anything checking for the ping messages sent from the server. I also didn't find anything in onMessageCallback. In our project, we're going to start looking into implementing this. If it works out, we'll make a pull request. However, I suspect this will involve adding a new option on the client for the duration of the interval (should be just a little higher than We also might try to go a bit further by instantly detecting an offline event and calling the close event immediately. But based on me looking around a bit, I believe that's why this issue is occurring. There's nothing on the client currently that detects disconnections. |
i got the same problem in wechat mini game of ios. in the client side, i can`t find a way to know the wss is disconnect, onLeave not triggering |
Reported by Josh via Discord (https://discord.com/channels/525739117951320081/526083188108296202/910023542702223380)
The text was updated successfully, but these errors were encountered: