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
dms3
go-dms3
Commits
fbba7c8f
Commit
fbba7c8f
authored
Jan 06, 2015
by
Juan Batiz-Benet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bootstrap: only dht bootstrap with live conns
parent
b9fe3780
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
core/bootstrap.go
core/bootstrap.go
+6
-4
No files found.
core/bootstrap.go
View file @
fbba7c8f
...
...
@@ -96,10 +96,12 @@ func bootstrap(ctx context.Context,
}
// we can try running dht bootstrap even if we're connected to all bootstrap peers.
if
err
:=
r
.
Bootstrap
(
ctx
,
numDHTBootstrapQueries
);
err
!=
nil
{
// log this as Info. later on, discern better between errors.
log
.
Infof
(
"dht bootstrap err: %s"
,
err
)
return
nil
if
len
(
h
.
Network
()
.
Conns
())
>
0
{
if
err
:=
r
.
Bootstrap
(
ctx
,
numDHTBootstrapQueries
);
err
!=
nil
{
// log this as Info. later on, discern better between errors.
log
.
Infof
(
"dht bootstrap err: %s"
,
err
)
return
nil
}
}
return
nil
}
...
...
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