From 7691ccc31812db9eb28a0ea2e220b4487fc853ba Mon Sep 17 00:00:00 2001 From: eihrul Date: Tue, 28 Jun 2011 15:25:53 +0000 Subject: fixed bug with simultaneous disconnects not dispatching events --- protocol.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'protocol.c') diff --git a/protocol.c b/protocol.c index d7c3fed..da64e91 100644 --- a/protocol.c +++ b/protocol.c @@ -764,7 +764,7 @@ enet_protocol_handle_disconnect (ENetHost * host, ENetPeer * peer, const ENetPro enet_peer_reset_queues (peer); - if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED) + if (peer -> state == ENET_PEER_STATE_CONNECTION_SUCCEEDED || peer -> state == ENET_PEER_STATE_DISCONNECTING) enet_protocol_dispatch_state (host, peer, ENET_PEER_STATE_ZOMBIE); else if (peer -> state != ENET_PEER_STATE_CONNECTED && peer -> state != ENET_PEER_STATE_DISCONNECT_LATER) -- cgit v1.2.3