Skip to content

Commit

Permalink
fix: use a non-limited connection for querying
Browse files Browse the repository at this point in the history
  • Loading branch information
2color committed Aug 19, 2024
1 parent be9a8e7 commit eca466c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion query.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"sync"
"time"

"github.com/libp2p/go-libp2p-core/network"

Check failure on line 11 in query.go

View workflow job for this annotation

GitHub Actions / go-test / ubuntu (go this)

missing go.sum entry for module providing package github.com/libp2p/go-libp2p-core/network (imported by github.com/libp2p/go-libp2p-kad-dht); to add:

Check failure on line 11 in query.go

View workflow job for this annotation

GitHub Actions / go-test / ubuntu (go next)

missing go.sum entry for module providing package github.com/libp2p/go-libp2p-core/network (imported by github.com/libp2p/go-libp2p-kad-dht); to add:

Check failure on line 11 in query.go

View workflow job for this annotation

GitHub Actions / go-test / windows (go this)

missing go.sum entry for module providing package github.com/libp2p/go-libp2p-core/network (imported by github.com/libp2p/go-libp2p-kad-dht); to add:

Check failure on line 11 in query.go

View workflow job for this annotation

GitHub Actions / go-test / windows (go next)

missing go.sum entry for module providing package github.com/libp2p/go-libp2p-core/network (imported by github.com/libp2p/go-libp2p-kad-dht); to add:

Check failure on line 11 in query.go

View workflow job for this annotation

GitHub Actions / go-test / macos (go this)

missing go.sum entry for module providing package github.com/libp2p/go-libp2p-core/network (imported by github.com/libp2p/go-libp2p-kad-dht); to add:

Check failure on line 11 in query.go

View workflow job for this annotation

GitHub Actions / go-test / macos (go next)

missing go.sum entry for module providing package github.com/libp2p/go-libp2p-core/network (imported by github.com/libp2p/go-libp2p-kad-dht); to add:
"github.com/libp2p/go-libp2p/core/peer"
pstore "github.com/libp2p/go-libp2p/core/peerstore"
"github.com/libp2p/go-libp2p/core/routing"
Expand Down Expand Up @@ -529,7 +530,7 @@ func (dht *IpfsDHT) dialPeer(ctx context.Context, p peer.ID) error {
defer span.End()

// short-circuit if we're already connected.
if HasValidConnectedness(dht.host, p) {
if dht.host.Network().Connectedness(p) == network.Connected {
return nil
}

Expand Down

0 comments on commit eca466c

Please sign in to comment.