always close sockets
This commit is contained in:
parent
b5406aa83b
commit
1f16800b73
|
@ -186,7 +186,7 @@ proc doConnect(srcIp: IpAddress, srcPort: Port, dstIp: IpAddress, dstPort: Port,
|
||||||
future.complete(sock)
|
future.complete(sock)
|
||||||
except OSError as e:
|
except OSError as e:
|
||||||
echo &"connection {srcIP}:{srcPort.int} -> {dstIp}:{dstPort.int} failed: ", e.msg
|
echo &"connection {srcIP}:{srcPort.int} -> {dstIp}:{dstPort.int} failed: ", e.msg
|
||||||
discard
|
sock.close()
|
||||||
|
|
||||||
proc connect*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress,
|
proc connect*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress,
|
||||||
dstPorts: seq[Port],
|
dstPorts: seq[Port],
|
||||||
|
|
Loading…
Reference in New Issue