From f50dada9993582b8dda1c1d409f327ff64a27556 Mon Sep 17 00:00:00 2001 From: Christian Ulrich Date: Thu, 8 Oct 2020 19:49:18 +0200 Subject: [PATCH] raise exception on OSError during accept --- tcp_syni.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcp_syni.nim b/tcp_syni.nim index 68ba2d2..2a2937f 100644 --- a/tcp_syni.nim +++ b/tcp_syni.nim @@ -302,4 +302,4 @@ proc accept*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress, else: raise newException(PunchHoleError, "timeout") except OSError as e: - echo &"accepting connections from {dstIP}:{dstPorts[0].int} failed: ", e.msg + raise newException(PunchHoleError, e.msg)