Page 1 of 1

Disconnect due to lost socket connection (before login)

Posted: 13 Nov 2010, 15:47
by fernando24691
Hello. :)

I've made some progress in my game, but there is a little "gap" that is annoying me since the first day. Let me explain.

When I launch my game, I first establish a connection with SFS, and store it in a static (global) SmartFoxClient class instance. Once I get a "Successfull connection" message, I can log in. But here is the gap.

I have a short time to log in (about 10-15 seconds) before I lose the socket connection. Once I log in, the connection remains indefinitely (if we ignore the auto-kick for inactive users). But, if I take more than 10-15 seconds to log in, I lose my socket connection and receive this message from the Debug:

[SFS DEBUG] Disconnect due to lost socket connection


If this is not an API error (sure it is not) there must be some variable handling "connection time remaining before loging in" (or something similar) that I forgot to set up. I want my game to wait "infinite" time before login, or at least a few minutes. Has anyone a solution? :?:

Thanks! :D

Posted: 13 Nov 2010, 16:26
by appels
there is also a socket connection timeout in the server config. I think the default is 10 secs.

Posted: 13 Nov 2010, 17:54
by fernando24691
Thank you! I added this line to my config.xml file and now it works fine.

Code: Select all

<MaxSocketIdleTime>100000</MaxSocketIdleTime>