Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
p2p
go-p2p-swarm
Commits
94712cc9
Commit
94712cc9
authored
Mar 08, 2019
by
Matt Joiner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add an error for no addresses
parent
bec19839
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
swarm_dial.go
swarm_dial.go
+5
-1
No files found.
swarm_dial.go
View file @
94712cc9
...
...
@@ -289,7 +289,11 @@ func (s *Swarm) dial(ctx context.Context, p peer.ID) (*Conn, error) {
the improved rate limiter, while maintaining the outward behaviour
that we previously had (halting a dial when we run out of addrs)
*/
goodAddrs
:=
s
.
filterKnownUndialables
(
s
.
peers
.
Addrs
(
p
))
peerAddrs
:=
s
.
peers
.
Addrs
(
p
)
if
len
(
peerAddrs
)
==
0
{
return
nil
,
errors
.
New
(
"no addresses"
)
}
goodAddrs
:=
s
.
filterKnownUndialables
(
peerAddrs
)
if
len
(
goodAddrs
)
==
0
{
return
nil
,
errors
.
New
(
"no good addresses"
)
}
...
...
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