Skip to content

Commit 6f1df26

Browse files
aschmahmannStebalien
authored andcommitted
use dht context during refreshes so that they can be logged
1 parent 5e318d3 commit 6f1df26

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dht_bootstrap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ func init() {
4444
// 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.
4545
func (dht *IpfsDHT) startSelfLookup() {
4646
dht.proc.Go(func(proc process.Process) {
47-
ctx := processctx.OnClosingContext(proc)
47+
ctx := processctx.WithProcessClosing(dht.ctx, proc)
4848
for {
4949
var waiting []chan<- error
5050
select {
@@ -85,7 +85,7 @@ func (dht *IpfsDHT) startSelfLookup() {
8585
func (dht *IpfsDHT) startRefreshing() {
8686
// scan the RT table periodically & do a random walk for cpl's that haven't been queried since the given period
8787
dht.proc.Go(func(proc process.Process) {
88-
ctx := processctx.OnClosingContext(proc)
88+
ctx := processctx.WithProcessClosing(dht.ctx, proc)
8989

9090
refreshTicker := time.NewTicker(dht.rtRefreshInterval)
9191
defer refreshTicker.Stop()

0 commit comments

Comments
 (0)