From d45b44f2b537d25442dd7734c789850b316450d6 Mon Sep 17 00:00:00 2001 From: Lee Salzman Date: Sun, 17 Nov 2013 20:19:17 +0200 Subject: [PATCH] allow loopback connections --- protocol.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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)