-
-
Notifications
You must be signed in to change notification settings - Fork 548
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
Auto-reconnect colyseus.js to server #62
Comments
That'd be useful indeed, thanks for the request @seiyria (I thought we'd have it in the new structure, but this feature is still missing) |
any chance this will make it in with an update to the 0.5.x branch? |
hopefully, we'll have it in a couple of weeks! |
Right now, this kinda works. If the server reboots, the client will predictably disconnect, and then it will reconnect but it will get BUFFER_SHORTAGE errors. To make this work again, the page has to be refreshed and a new connection has to be created. |
@seiyria can you try When reconnecting automatically, the WebSocket was loosing the Cheers! |
@endel it looks like I will still get it during those other conditions (ie, randomly on joining a room). However, it no longer happens on reset! I'll try to dig in on why this is happening. Now, on refresh, I get: core.es5.js:1084 ERROR TypeError: Cannot read property 'id' of undefined Here:
|
This looks like it's working now, with no side effects! |
Closing as this seems to be solved. Feel free to re-open if you'd like to! |
In my development environment, any time I save/restart the server (I'm using nodemon), it reboots. The client will disconnect and then I have to refresh the page to reconnect. In a live game, this means that if I push an update to the server every player will disconnect and not attempt to reconnect automatically.
Automatic reconnection (with exponential backoff configurable, as primus has) would help this a lot.
The text was updated successfully, but these errors were encountered: