Hi Smartfoxserver Team,
I tried to change the "user maximum idle time" to 3000 seconds (both in server configuration and Zone configuration)
However, after logged into Zone, the user is disconnected after next 5 minuites.
How can I extends this idle time ?
13:24:06,082 INFO [SFSWorker:Ext:2] api.SFSApi - User login: { Zone: OnlineGame }, ( User Name: ducbot, Id: 1, Priv: 0, Sess: 127.0.0.1:51087 ) , Type: Unity
13:29:06,092 INFO [Scheduler-412111214] sessions.DefaultSessionManager - Session removed: { Id: 3, Type: WEBSOCKET, Logged: Yes, IP: 127.0.0.1:51087 }
13:29:06,096 INFO [SFSWorker:Sys:1] api.SFSApi - User disconnected: { Zone: OnlineGame }, ( User Name: ducbot, Id: 1, Priv: 0, Sess: 127.0.0.1:51087 ) , SessionLen: 300014, Type: Unity
Thank you.
user is disconnected after 5 minuites logged in (idle)
Re: user is disconnected after 5 minuites logged in (idle)
Hi,
in the logs there is no evidence that the server disconnected the client. When it happens the server logs a specific message, saying that the client was disconnected because it was idle for too long.
You can also double check that by printing out the disconnection reason in the SFSEvent.CONNECTION_LOST. If it says "unknown" then the disconnection was not initiated by the server.
Given you're testing in a local network it's likely that the browser dropped the connection after a while. To avoid it you can keep it alive with by sending a "signal" every once in a while. This can be done, for example, by activating the LagMonitor in the API which calculates the lag between client and server by sending a "ping pong" request every few seconds.
( see here: https://smartfoxserver.com/blog/the-imp ... ing-times/ )
Otherwise you can make a custom "ping pong" request by sending an empty Extension request (ping) and replying with an empty response (pong).
Hope it helps
in the logs there is no evidence that the server disconnected the client. When it happens the server logs a specific message, saying that the client was disconnected because it was idle for too long.
You can also double check that by printing out the disconnection reason in the SFSEvent.CONNECTION_LOST. If it says "unknown" then the disconnection was not initiated by the server.
Given you're testing in a local network it's likely that the browser dropped the connection after a while. To avoid it you can keep it alive with by sending a "signal" every once in a while. This can be done, for example, by activating the LagMonitor in the API which calculates the lag between client and server by sending a "ping pong" request every few seconds.
( see here: https://smartfoxserver.com/blog/the-imp ... ing-times/ )
Otherwise you can make a custom "ping pong" request by sending an empty Extension request (ping) and replying with an empty response (pong).
Hope it helps
Who is online
Users browsing this forum: No registered users and 72 guests