better debug output
This commit is contained in:
parent
abbeaa61d8
commit
ee3ab4564d
|
@ -92,11 +92,14 @@ proc handleMsg*(puncher: Puncher, msg: string, peerIp: IpAddress,
|
||||||
# We received a SYN packet. We ignore it because we expected it to be
|
# We received a SYN packet. We ignore it because we expected it to be
|
||||||
# filtered by our NAT.
|
# filtered by our NAT.
|
||||||
return
|
return
|
||||||
echo &"handling ACK message from {peerIp}:{peerPort}"
|
|
||||||
let (_, myPort) = puncher.sock.getLocalAddr()
|
let (_, myPort) = puncher.sock.getLocalAddr()
|
||||||
let query = Attempt(srcPort: myPort, dstIp: peerIp, dstPorts: @[peerPort])
|
let query = Attempt(srcPort: myPort, dstIp: peerIp, dstPorts: @[peerPort])
|
||||||
let i = puncher.attempts.find(query)
|
let i = puncher.attempts.find(query)
|
||||||
if i != -1:
|
if i != -1:
|
||||||
|
if msg == "ACK":
|
||||||
|
echo &"handling ACK message from {peerIp}:{peerPort}"
|
||||||
|
else:
|
||||||
|
echo &"handling QUIC message from {peerIp}:{peerPort}"
|
||||||
puncher.attempts[i].future.complete(peerPort)
|
puncher.attempts[i].future.complete(peerPort)
|
||||||
puncher.attempts.del(i)
|
puncher.attempts.del(i)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue