close accepted socket if no attempt was found
This commit is contained in:
parent
4d96a58e87
commit
282c0ea6ab
|
@ -257,6 +257,7 @@ proc doAccept(puncher: TcpSyniPuncher, srcIp: IpAddress,
|
||||||
let i = puncher.findAcceptAttempt(srcIp, srcPort, peerIp, @[peerPort])
|
let i = puncher.findAcceptAttempt(srcIp, srcPort, peerIp, @[peerPort])
|
||||||
if i == -1:
|
if i == -1:
|
||||||
echo "Accepted connection, but no attempt found. Discarding."
|
echo "Accepted connection, but no attempt found. Discarding."
|
||||||
|
peer.close()
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
let attempt = puncher.acceptAttempts[i]
|
let attempt = puncher.acceptAttempts[i]
|
||||||
|
|
Loading…
Reference in New Issue