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
b20f767e
Commit
b20f767e
authored
Jan 23, 2015
by
Juan Batiz-Benet
Browse files
p2p/net/conn: timeouts are real failures.
parent
bdda7ff6
Changes
1
Hide whitespace changes
Inline
Side-by-side
net/conn/dial.go
View file @
b20f767e
...
...
@@ -147,6 +147,11 @@ func reuseErrShouldRetry(err error) bool {
return
false
// hey, it worked! no need to retry.
}
// if it's a network timeout error, it's a legitimate failure.
if
nerr
,
ok
:=
err
.
(
net
.
Error
);
ok
&&
nerr
.
Timeout
()
{
return
true
}
errno
,
ok
:=
err
.
(
syscall
.
Errno
)
if
!
ok
{
// not an errno? who knows what this is. retry.
return
true
...
...
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