From 572b443ea0847d0c50f89128bdb9238e7359a249 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Wed, 7 Oct 2020 00:03:46 +0200 Subject: [PATCH] must await all calls to injectTcpPacket before closing rawFd --- tcp_syni.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp_syni.nim b/tcp_syni.nim index 0587b21..651eda6 100644 --- a/tcp_syni.nim +++ b/tcp_syni.nim @@ -296,7 +296,7 @@ proc accept*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress, tcpSeqNumber: seqNum, tcpAckNumber: 0, tcpFlags: {SYN}, tcpWindowSize: 1452 * 10) echo &"[{ipPacket.ipAddrSrc}:{ipPacket.tcpPortSrc} -> {ipPacket.ipAddrDst}:{ipPacket.tcpPortDst}, SEQ {ipPacket.tcpSeqNumber}] injecting SYN" - asyncCheck rawFd.injectTcpPacket(ipPacket) + await rawFd.injectTcpPacket(ipPacket) closeSocket(rawFd) await attempt.future or sleepAsync(Timeout) await attempt.deleteFirewallRules()