delete attempts in proc cleanup
This commit is contained in:
parent
87a8c44954
commit
af244030bf
|
@ -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.} =
|
||||||
for attempt in puncher.connectAttempts:
|
while puncher.connectAttempts.len() != 0:
|
||||||
await attempt.deleteFirewallRules()
|
puncher.connectAttempts.pop().deleteFirewallRules()
|
||||||
for attempt in puncher.acceptAttempts:
|
while puncher.acceptAttempts.len() != 0:
|
||||||
await attempt.deleteFirewallRules()
|
puncher.connectAttempts.pop().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.} =
|
||||||
|
|
Loading…
Reference in New Issue