[Computer-go] CGOS Dropped Connections - Two automatic losses on time.
dailey.don at gmail.com
Mon Nov 8 06:17:24 PST 2010
One possible solution is for the server to force the previous login to
disconnect if it thinks that player is currently connected. It will send a
quit command to the client and then realize there is no connection and this
On time forfeit I could automatically close the connection which should also
tell the server what the state of the connection is. It will of course be
up to the client to reconnect.
I should probably not forfeit games where one of the players has not made at
least 1 move - although the previous 2 fixes should prevent that from
happening. But this might be useful for debugging new programs.
On Fri, Nov 5, 2010 at 9:04 PM, Robert Finking <robertfinkng555 at o2.co.uk>wrote:
> Hi Don, All,
> During the current testing cycle of the engine pack, one thing I've noticed
> is the excellent built in facility of the CGOS client to handle my internet
> connection going down. As soon as it goes down, it automatically tries to
> reconnect. However, the server doesn't handle this so well.
> The client realises the connection has dropped and tries to log in again.
> The server doesn't notice the client has gone. When the client attempts to
> reconnect, the server thinks it is already there. This causes two losses:
> 1. The engine can't finish the interrupted game and loses that game on time
> 2. The server thinks the engine is still connected, so it schedules another
> game for the engine, which it also loses on time.
> The good news is the reconnect does happen after not too long (a couple of
> games go by before the login times out).
> Is it possible to easily improve this? I know from experience that
> detecting a loss of connection can be problematic due to timeouts in the
> network stack. Would it be possible to add some kind of Client->Server
> heartbeat/ping. The client sends a heartbeat say once per 10 seconds. If you
> miss two heartbeats on the trot, you automatically kill the login.
> If adding heartbeats is too much, how about just timing out if you haven't
> had a response from the client for over a minute since the last move?
> As an easy safeguard against two losses, you could automatically log out if
> a player loses on time.
> Just a thought - hope it helps. Thanks again for an excellent setup - there
> are so many things you have thought of already!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Computer-go