Fixes Issue 30 - locked clients

You need another termination case here, such that you don't go on pinging after the sync is ended, client is disconnected, etc.  There might be other cases too.