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-kad-dht
Commits
6f1df268
Commit
6f1df268
authored
Apr 03, 2020
by
Adin Schmahmann
Committed by
Steven Allen
Apr 05, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use dht context during refreshes so that they can be logged
parent
5e318d32
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
dht_bootstrap.go
dht_bootstrap.go
+2
-2
No files found.
dht_bootstrap.go
View file @
6f1df268
...
...
@@ -44,7 +44,7 @@ func init() {
// if multiple callers "simultaneously" ask for a self walk, it performs ONLY one self walk and sends the same error status to all of them.
func
(
dht
*
IpfsDHT
)
startSelfLookup
()
{
dht
.
proc
.
Go
(
func
(
proc
process
.
Process
)
{
ctx
:=
processctx
.
OnClosingContext
(
proc
)
ctx
:=
processctx
.
WithProcessClosing
(
dht
.
ctx
,
proc
)
for
{
var
waiting
[]
chan
<-
error
select
{
...
...
@@ -85,7 +85,7 @@ func (dht *IpfsDHT) startSelfLookup() {
func
(
dht
*
IpfsDHT
)
startRefreshing
()
{
// scan the RT table periodically & do a random walk for cpl's that haven't been queried since the given period
dht
.
proc
.
Go
(
func
(
proc
process
.
Process
)
{
ctx
:=
processctx
.
OnClosingContext
(
proc
)
ctx
:=
processctx
.
WithProcessClosing
(
dht
.
ctx
,
proc
)
refreshTicker
:=
time
.
NewTicker
(
dht
.
rtRefreshInterval
)
defer
refreshTicker
.
Stop
()
...
...
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