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