Revert "delete attempts in proc cleanup"

This reverts commit af244030bf.
This commit is contained in:
Christian Ulrich 2020-10-07 09:22:53 +02:00
parent af244030bf
commit 12992f5ced
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 4 additions and 4 deletions

View File

@ -174,10 +174,10 @@ proc predictPortRange(dstPorts: seq[Port]): seq[Port] =
result[i] = Port(basePort + i.uint16) result[i] = Port(basePort + i.uint16)
proc cleanup*(puncher: TcpSyniPuncher) {.async.} = proc cleanup*(puncher: TcpSyniPuncher) {.async.} =
while puncher.connectAttempts.len() != 0: for attempt in puncher.connectAttempts:
puncher.connectAttempts.pop().deleteFirewallRules() await attempt.deleteFirewallRules()
while puncher.acceptAttempts.len() != 0: for attempt in puncher.acceptAttempts:
puncher.connectAttempts.pop().deleteFirewallRules() await attempt.deleteFirewallRules()
proc doConnect(srcIp: IpAddress, srcPort: Port, dstIp: IpAddress, dstPort: Port, proc doConnect(srcIp: IpAddress, srcPort: Port, dstIp: IpAddress, dstPort: Port,
future: Future[AsyncSocket]) {.async.} = future: Future[AsyncSocket]) {.async.} =