introduce rate limit again
This commit is contained in:
parent
e47a9d0191
commit
9445029b0d
|
@ -79,6 +79,7 @@ proc punch(puncher: Puncher, peerIp: IpAddress, peerPort: Port,
|
|||
# TODO: replace asyncdispatch.sendTo with asyncnet.sendTo (Nim 1.4 required)
|
||||
await sendTo(sock.getFd.AsyncFD, msg.cstring, msg.len,
|
||||
cast[ptr SockAddr](addr peerAddr), peerSockLen)
|
||||
await sleepAsync(10)
|
||||
if lowTTL:
|
||||
sock.getFd.setSockOptInt(IPPROTO_IP, IP_TTL, defaultTTL)
|
||||
except OSError as e:
|
||||
|
|
Loading…
Reference in New Issue