try without rate limit, but more holes
This commit is contained in:
parent
9445029b0d
commit
25acfc9518
|
@ -79,7 +79,6 @@ 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:
|
||||
|
|
|
@ -393,7 +393,7 @@ proc main() =
|
|||
var ctx: QuicP2PContext
|
||||
var socks = newSeq[AsyncSocket]()
|
||||
randomize()
|
||||
for i in 0 .. 4:
|
||||
for i in 0 .. 9:
|
||||
# FIXME: close socks
|
||||
let sock = newAsyncSocket(sockType = SOCK_DGRAM, protocol = IPPROTO_UDP,
|
||||
buffered = false)
|
||||
|
|
Loading…
Reference in New Issue