From 282c0ea6abbd1378541775e8c21eea7f0c511a0e Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Wed, 7 Oct 2020 09:36:15 +0200 Subject: [PATCH] close accepted socket if no attempt was found --- tcp_syni.nim | 1 + 1 file changed, 1 insertion(+) diff --git a/tcp_syni.nim b/tcp_syni.nim index df5536e..bce5907 100644 --- a/tcp_syni.nim +++ b/tcp_syni.nim @@ -257,6 +257,7 @@ proc doAccept(puncher: TcpSyniPuncher, srcIp: IpAddress, let i = puncher.findAcceptAttempt(srcIp, srcPort, peerIp, @[peerPort]) if i == -1: echo "Accepted connection, but no attempt found. Discarding." + peer.close() continue else: let attempt = puncher.acceptAttempts[i]