Lost Connection and Reconnection
Posted: 23 Jun 2011, 05:59
Hello!
SFS version: 2.0.0-RC2a
Platform: Flash
Often the connection win SFS behaves unclear:
I don't recive any event from SmartFox class (no CONNECTION_LOST). But client stop revice messages from server. Form check it I every 2 minutes of silence send my own "ping" command (created by Extension).
By the way, I try to use your PING_PONG request and it don't wont to work, maby I do something wrong.
However, if I revice answer from server by my ping command - that's mean, that connection alive. But if I don't resive any responce in 5 sec, I deside, that connection lost. I do disconnect(), wait for LOST_CONNECTION event, and then, after 5 secons, execute connect() command.
It script work successfully only at 10% of issues. As a rule, after sendiong connect() command I don't resive any responce from server and after 2 minutes of silence I do reconnection agane and agane, but without result.
What problem is? What I do wrong?
My server configuration I post at previos topic:
http://www.smartfoxserver.com/forums/viewtopic.php?p=47083#47083
SFS version: 2.0.0-RC2a
Platform: Flash
Often the connection win SFS behaves unclear:
I don't recive any event from SmartFox class (no CONNECTION_LOST). But client stop revice messages from server. Form check it I every 2 minutes of silence send my own "ping" command (created by Extension).
By the way, I try to use your PING_PONG request and it don't wont to work, maby I do something wrong.
However, if I revice answer from server by my ping command - that's mean, that connection alive. But if I don't resive any responce in 5 sec, I deside, that connection lost. I do disconnect(), wait for LOST_CONNECTION event, and then, after 5 secons, execute connect() command.
It script work successfully only at 10% of issues. As a rule, after sendiong connect() command I don't resive any responce from server and after 2 minutes of silence I do reconnection agane and agane, but without result.
What problem is? What I do wrong?
My server configuration I post at previos topic:
http://www.smartfoxserver.com/forums/viewtopic.php?p=47083#47083