aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--protocol.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocol.c b/protocol.c
index 3438a5d..11d0c4c 100644
--- a/protocol.c
+++ b/protocol.c
@@ -297,7 +297,8 @@ enet_protocol_handle_connect (ENetHost * host, ENetProtocolHeader * header, ENet
peer = currentPeer;
}
else
- if (currentPeer -> address.host == host -> receivedAddress.host)
+ if (currentPeer -> state != ENET_PEER_STATE_CONNECTING &&
+ currentPeer -> address.host == host -> receivedAddress.host)
{
if (currentPeer -> address.port == host -> receivedAddress.port &&
currentPeer -> connectID == command -> connect.connectID)