Enhance hole punching#20
Enhance hole punching#20optman wants to merge 2 commits intodennis-tra:decentralized-hole-punchingfrom
Conversation
|
With the new decentralized hole punching, there is a connection reversal mechanism. I could imagine that this step here is not really necessary. I'll give it a try! |
|
@dennis-tra The reversal connection is auto start after the relay connection established, it may take several round trip time(maybe 10~60 seconds, depend on where the relay node is) . |
|
So you want to make sure we actually use a direct connection for the new stream that gets created a couple of lines later, right? |
|
yes, try to create direct connection is one way to check hole-punch is completed, I don't think there is other better way. |
|
There's the option to pass a tracer into the |
|
Good idea, I didn't thought |
We can try to establish direct connection before transfer (while hole-punching is going on background). I also enable
libp2p"p2p-holepunching" log when-debugflag set, so we can see why hole punching fail (in my case it will mostly timeout with the default dial timeout value).