summaryrefslogtreecommitdiff
path: root/server.py
diff options
context:
space:
mode:
authorOlivier Gayot <duskcoder@gmail.com>2015-06-04 20:14:08 +0100
committerOlivier Gayot <duskcoder@gmail.com>2015-06-04 20:14:08 +0100
commit2d93787b926cbfe1e9b33e66e1900613d320b090 (patch)
treee153c433729c95d09d786fd29b0399aedf8c88c5 /server.py
parentc5f0a0b71a9f287006868da2e2209b0622164812 (diff)
handle the disconnection of the clients
when a client disconnects, we must not try to send him a message since its socket is destroyed. However, a race condition can still probably occur if a client is disconnected during the handling of a request which leads to a notification. Signed-off-by: Olivier Gayot <duskcoder@gmail.com>
Diffstat (limited to 'server.py')
-rwxr-xr-xserver.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/server.py b/server.py
index cdd8abf..9a9e75a 100755
--- a/server.py
+++ b/server.py
@@ -13,7 +13,7 @@ def new_client_handler(client, server):
client['cao_client'] = CAO_Client.CAO_Client(server, client, game_manager)
def client_left_handler(client, server):
- pass
+ client['cao_client'].disconnect();
def message_received_handler(client, server, message):
try: