Disconnect due to lost socket connection (before login)

Post here all your questions related with SmartFoxServer .Net/Unity3D API

Moderators: Lapo, Bax

fernando24691
Posts: 30
Joined: 20 Oct 2010, 19:37

Disconnect due to lost socket connection (before login)

Postby fernando24691 » 13 Nov 2010, 15:47

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
appels
Posts: 464
Joined: 28 Jul 2010, 02:12
Contact:

Postby appels » 13 Nov 2010, 16:26

there is also a socket connection timeout in the server config. I think the default is 10 secs.
fernando24691
Posts: 30
Joined: 20 Oct 2010, 19:37

Postby fernando24691 » 13 Nov 2010, 17:54

Thank you! I added this line to my config.xml file and now it works fine.

Code: Select all

<MaxSocketIdleTime>100000</MaxSocketIdleTime>

Return to “.Net / Unity3D API”

Who is online

Users browsing this forum: No registered users and 3 guests