From 00c29d9401a5880197ff989f8d98833db09eae08 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Wed, 30 Jul 2008 09:32:11 +0000 Subject: [PATCH] duplicated disconnect fixes git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2258 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/enet/peer.c | 1 + source/enet/protocol.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/source/enet/peer.c b/source/enet/peer.c index f9d73fc5..38190f6d 100755 --- a/source/enet/peer.c +++ b/source/enet/peer.c @@ -422,6 +422,7 @@ enet_peer_disconnect (ENetPeer * peer, enet_uint32 data) if (peer -> state == ENET_PEER_STATE_DISCONNECTING || peer -> state == ENET_PEER_STATE_DISCONNECTED || + peer -> state == ENET_PEER_STATE_ACKNOWLEDING_DISCONNECT || peer -> state == ENET_PEER_STATE_ZOMBIE) return; diff --git a/source/enet/protocol.c b/source/enet/protocol.c index af82fd6b..47bf8447 100755 --- a/source/enet/protocol.c +++ b/source/enet/protocol.c @@ -629,6 +629,9 @@ enet_protocol_handle_throttle_configure (ENetHost * host, ENetPeer * peer, const static int enet_protocol_handle_disconnect (ENetHost * host, ENetPeer * peer, const ENetProtocol * command) { + if (peer -> state == ENET_PEER_STATE_ZOMBIE || peer -> state == ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT) + return 0; + enet_peer_reset_queues (peer); if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED)