aboutsummaryrefslogtreecommitdiffhomepage
path: root/protocol.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocol.c')
-rw-r--r--protocol.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/protocol.c b/protocol.c
index bc1b79c..e6263eb 100644
--- a/protocol.c
+++ b/protocol.c
@@ -777,14 +777,8 @@ enet_protocol_handle_incoming_commands (ENetHost * host, ENetEvent * event)
break;
case ENET_PEER_STATE_ACKNOWLEDGING_DISCONNECT:
- if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT)
- enet_peer_queue_acknowledgement (peer, command, header -> sentTime);
- break;
-
- case ENET_PEER_STATE_ACKNOWLEDGING_CONNECT:
- if ((command -> header.command & ENET_PROTOCOL_COMMAND_MASK) == ENET_PROTOCOL_COMMAND_DISCONNECT)
- enet_peer_queue_acknowledgement (peer, command, header -> sentTime);
- break;
+ if (command -> header.command != ENET_PROTOCOL_COMMAND_DISCONNECT)
+ break;
default:
enet_peer_queue_acknowledgement (peer, command, header -> sentTime);