Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
go-libp2p
Commits
d5a3bf1f
Commit
d5a3bf1f
authored
Jan 22, 2015
by
Juan Batiz-Benet
Browse files
p2p/net/swarm: half the timeout of dial
parent
dec34b48
Changes
1
Hide whitespace changes
Inline
Side-by-side
net/conn/dial.go
View file @
d5a3bf1f
...
...
@@ -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
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment