Browse Source

fix(dht): try to not make blocking announces

Signed-off-by: Ettore Di Giacinto <[email protected]>
Ettore Di Giacinto 1 year ago
parent
commit
b25762b4be
1 changed files with 2 additions and 2 deletions
  1. 2 2
      pkg/discovery/dht.go

+ 2 - 2
pkg/discovery/dht.go

@@ -117,13 +117,13 @@ func (d *DHT) Run(c log.StandardLogger, ctx context.Context, host host.Host) err
 	}
 
 	go func() {
-		connect()
+		go connect()
 		t := utils.NewBackoffTicker(utils.BackoffMaxInterval(d.RefreshDiscoveryTime))
 		defer t.Stop()
 		for {
 			select {
 			case <-t.C:
-				connect()
+				go connect()
 			case <-ctx.Done():
 				return
 			}