From d06106780104380424812a6b7c484d8d0adcb0e2 Mon Sep 17 00:00:00 2001 From: mudler Date: Sun, 11 Aug 2024 09:59:09 +0200 Subject: [PATCH] fix: do not prematurely close channel Signed-off-by: mudler --- pkg/discovery/dht.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/discovery/dht.go b/pkg/discovery/dht.go index a88efb37..e359d947 100644 --- a/pkg/discovery/dht.go +++ b/pkg/discovery/dht.go @@ -164,7 +164,7 @@ func (d *DHT) FindClosePeers(ll log.StandardLogger, onlyStaticRelays bool, stati if !onlyStaticRelays { closestPeers, err := d.GetClosestPeers(ctx, d.PeerID().String()) if err != nil { - close(peerChan) + ll.Debug("Error getting closest peers: ", err) } for _, p := range closestPeers {