<div dir="ltr">Lee,<br>I've a comment/question on the committed change:<br><br>As I understand the code, we want the duplicatePeers variable to be updated each time we have connect confirmation from the same host (although I don't understand its purpose yet).<div>
<br></div><div>I think it won't be updated the way it's now, that's why I've put the "currentPeer -> state != ENET_PEER_STATE_CONNECTING"</div><div>check in the inner if, after the check for same host (see below).</div>
<div><br>-        if (currentPeer -> address.host == host -> receivedAddress.host)<br>+        if (currentPeer -> state != ENET_PEER_STATE_CONNECTING /* Krasi: see my comment below */ &&<br>+            currentPeer -> address.host == host -> receivedAddress.host)<br>
         {</div><div><br></div><div>             /* Krasi: I think the check should be here instead of the above if() in order to correctly update duplicatePeers? */<br>             if (currentPeer -> address.port == host -> receivedAddress.port &&<br>
                 currentPeer -> connectID == command -> connect.connectID)<br>              return NULL;<br><br>            ++ duplicatePeers;<br>        }<br>    }<br><br>    if (peer == NULL || duplicatePeers >= host -> duplicatePeers)<br>
      return NULL;<br><br>I might well be wrong or don't understand the purpose of duplicatePeers, so sorry for the comment :).</div><div><br></div><div>--Krasi</div><div><br>On Mon, Nov 18, 2013 at 2:21 PM, Lee Salzman <<a href="mailto:lsalzman@gmail.com">lsalzman@gmail.com</a>> wrote:<br>
><br>> For better or worse I committed a version of this fix to the repo. I didn't have time to actually test it out, though, so I will, uh, let you guys beta-test this one. ;)<br></div></div>