duplicated disconnect fixes

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@2258 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
Lee Salzman
2008-07-30 09:32:11 +00:00
parent cde0938c0f
commit 00c29d9401
2 changed files with 4 additions and 0 deletions
+1
View File
@@ -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;
+3
View File
@@ -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)