How to decrease connection timeout on client?
-
- Posts: 71
- Joined: 19 Oct 2011, 16:40
- Location: Alaska
- Contact:
How to decrease connection timeout on client?
If for some reason an SFS client can't reach the server, it will wait for about 2 minutes before timing out and calling the failure callback. I would like to reduce this to 15 seconds or so, but I haven't been able to figure out how to do this in the Unity client API. Does anyone know?
Re: How to decrease connection timeout on client?
Moved to the right section.
I think it has to do with the underlying Mono socket timeout, but I am not sure if it is modifiable.
Let's see if Thomas knows the secret
I think it has to do with the underlying Mono socket timeout, but I am not sure if it is modifiable.
Let's see if Thomas knows the secret
-
- Posts: 71
- Joined: 19 Oct 2011, 16:40
- Location: Alaska
- Contact:
Re: How to decrease connection timeout on client?
Thomas? Are you out there?
Re: How to decrease connection timeout on client?
Where does this happen exaclty? I tested in the Editor and I don't see problems.
Also, we recently release a Unity API update. In case you missed it, you can grab it from here:
http://www.smartfoxserver.com/download/sfs2x#p=updates
Also, we recently release a Unity API update. In case you missed it, you can grab it from here:
http://www.smartfoxserver.com/download/sfs2x#p=updates
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Re: How to decrease connection timeout on client?
We had a similar issue for our upcoming game, but I was not personally involved in the fix. So I dont know for certain if there was anything else done than the server side configuration change. The programmer who did it is on vacation this week. Will ask him next week when he returns.
On the server side we changed the following parameters (setting them to 10):
<sessionMaxIdleTime>10</sessionMaxIdleTime>
<userMaxIdleTime>10</userMaxIdleTime>
That (+ potentially some game client changes) makes our game timeout much faster and can then handle that situation gracefully vs. waiting the full TCP timeout period.
/T
On the server side we changed the following parameters (setting them to 10):
<sessionMaxIdleTime>10</sessionMaxIdleTime>
<userMaxIdleTime>10</userMaxIdleTime>
That (+ potentially some game client changes) makes our game timeout much faster and can then handle that situation gracefully vs. waiting the full TCP timeout period.
/T
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
-
- Posts: 71
- Joined: 19 Oct 2011, 16:40
- Location: Alaska
- Contact:
Re: How to decrease connection timeout on client?
I'll give that a try, but I don't see how it can work. The situation I want to deal with is when the server is down or unreachable.
Re: How to decrease connection timeout on client?
Yeah, it's unlikely that the config will affect a non-running server...
Can you please provide a bit more info please? Is this happening in the Editor? WebPlayer? Both?
Thanks
Can you please provide a bit more info please? Is this happening in the Editor? WebPlayer? Both?
Thanks
-
- Posts: 71
- Joined: 19 Oct 2011, 16:40
- Location: Alaska
- Contact:
Re: How to decrease connection timeout on client?
It happens in the editor and all players. Seems like it's just a set timeout value somewhere.
Re: How to decrease connection timeout on client?
We are not able to reproduce the problem neither in the Editor, nor in the player.
In order to test we are using the Connector which is the most simple example provided in the Unity Example package.
Can you please check that Example and see if it's causing the same issue? I have pointed it our website which doesn't run any SFS2X instances.
If the problem persist please tell me also which Unity version you're using.
Thanks
In order to test we are using the Connector which is the most simple example provided in the Unity Example package.
Can you please check that Example and see if it's causing the same issue? I have pointed it our website which doesn't run any SFS2X instances.
If the problem persist please tell me also which Unity version you're using.
Thanks
-
- Posts: 71
- Joined: 19 Oct 2011, 16:40
- Location: Alaska
- Contact:
Re: How to decrease connection timeout on client?
I can't get to that today, but I'll check it as soon as I get time.
-
- Posts: 1297
- Joined: 14 Mar 2008, 07:52
- Location: Sweden
Re: How to decrease connection timeout on client?
Ahhh yeah - a non-running server in the first place. I read it as a server that is turned off and the client then keeps the connection alive.
No issues here on server that isnt running. So a little more info needed if you still have this issue consistently with the latest dll. Anything from OS to Unity version to deployment environment.
/T
No issues here on server that isnt running. So a little more info needed if you still have this issue consistently with the latest dll. Anything from OS to Unity version to deployment environment.
/T
Full Control - maker of Unity/C# and Java SFS API and indie games
Follow on twitter: http://twitter.com/thomas_h_lund
Follow on twitter: http://twitter.com/thomas_h_lund
Who is online
Users browsing this forum: No registered users and 21 guests