Commit 0821a5bd authored by Juan Batiz-Benet's avatar Juan Batiz-Benet

p2p/net/swarm: half the timeout of dial

parent 10ae01f6
......@@ -115,6 +115,9 @@ func (d *Dialer) reuseDial(laddr, raddr ma.Multiaddr) (conn net.Conn, retry bool
return nil, true, reuseport.ErrReuseFailed
}
// half the timeout so we can retry regularly if this fails.
d.Dialer.Dialer.Timeout = (d.Dialer.Dialer.Timeout / 2)
// give reuse.Dialer the manet.Dialer's Dialer.
// (wow, Dialer should've so been an interface...)
rd := reuseport.Dialer{d.Dialer.Dialer}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment