close socket when we stop accepting

This commit is contained in:
Christian Ulrich 2020-10-04 11:43:46 +02:00
parent 9e3b7fe987
commit daa31f285d
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 1 additions and 0 deletions

View File

@ -258,6 +258,7 @@ proc doAccept(puncher: TcpSyniPuncher, srcIp: IpAddress,
# FIXME: should attempts have timestamps, so we can decide here which ones to delete? # FIXME: should attempts have timestamps, so we can decide here which ones to delete?
if attempts.len() <= 1: if attempts.len() <= 1:
break break
sock.close()
proc accept*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress, proc accept*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress,
dstPorts: seq[Port], dstPorts: seq[Port],