[Computer-go] CGOS Dropped Connections - Two automatic losses on time.

Robert Finking robertfinkng555 at o2.co.uk
Fri Nov 5 18:04:15 PDT 2010


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!

Raffles




More information about the Computer-go mailing list