#1 2013-11-13 20:30:22

nirnir
Member
Registered: 2013-11-11
Posts: 66

Auto reconnect / onDisconnected event

Hi,
Thanks for your great work .

I want the client to reconnect to server after server restart or communication failure .
Any idea of how doing that ?
I think it would be useful to have some kind of onDisconnected event after keepalive fault or other communication fault

Offline

#2 2014-06-03 02:37:59

Feng
Member
Registered: 2013-05-15
Posts: 28

Re: Auto reconnect / onDisconnected event

In Client-Server mode,I also encountered the same problem, the server restarts, or after the client and no movement for a long time, operation again the client will get an error. How to reconnect to the server, in addition to restarting the client?

Offline

#3 2014-06-03 06:31:51

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,659
Website

Re: Auto reconnect / onDisconnected event

Clients do reconnect automatically when connection is lost.

But sessions are in memory so after a server restart, you loose your previous session.

Offline

#4 2014-06-03 08:09:53

Feng
Member
Registered: 2013-05-15
Posts: 28

Re: Auto reconnect / onDisconnected event

Many thanks for your prompt reply.

I encountered a more accurate description of the problem should be the failure of the session you said, that is after the link is lost, the client sends a request to the server to respond again after a 403 error, seems to have been like this, can not be restored to a normal state, this view, then, is not in this case the client must re-call the next SetUser () in order to achieve the purpose of the session reconstruction, and to link back to the normal state.

Last edited by Feng (2014-06-03 08:10:20)

Offline

Board footer

Powered by FluxBB