raise exception on OSError during accept

This commit is contained in:
Christian Ulrich 2020-10-08 19:49:18 +02:00
parent 8bff4c79d9
commit f50dada999
No known key found for this signature in database
GPG Key ID: 8241BE099775A097
1 changed files with 1 additions and 1 deletions

View File

@ -302,4 +302,4 @@ proc accept*(puncher: TcpSyniPuncher, srcPort: Port, dstIp: IpAddress,
else: else:
raise newException(PunchHoleError, "timeout") raise newException(PunchHoleError, "timeout")
except OSError as e: except OSError as e:
echo &"accepting connections from {dstIP}:{dstPorts[0].int} failed: ", e.msg raise newException(PunchHoleError, e.msg)