Unverified Commit 95b0d819 authored by dirkmc's avatar dirkmc Committed by GitHub

Merge pull request #226 from ipfs/fix/provider-connect

fix: wait until we finish connecting before we cancel the context
parents dcbe1f29 2e76860d
module github.com/ipfs/go-bitswap module github.com/ipfs/go-bitswap
require ( require (
github.com/btcsuite/btcd v0.0.0-20190605094302-a0d1e3e36d50 // indirect
github.com/cskr/pubsub v1.0.2 github.com/cskr/pubsub v1.0.2
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/gogo/protobuf v1.3.1 github.com/gogo/protobuf v1.3.1
github.com/golang/protobuf v1.3.1 // indirect
github.com/google/uuid v1.1.1 github.com/google/uuid v1.1.1
github.com/ipfs/go-block-format v0.0.2 github.com/ipfs/go-block-format v0.0.2
github.com/ipfs/go-cid v0.0.3 github.com/ipfs/go-cid v0.0.3
...@@ -22,20 +19,15 @@ require ( ...@@ -22,20 +19,15 @@ require (
github.com/ipfs/go-peertaskqueue v0.1.1 github.com/ipfs/go-peertaskqueue v0.1.1
github.com/jbenet/goprocess v0.1.3 github.com/jbenet/goprocess v0.1.3
github.com/libp2p/go-buffer-pool v0.0.2 github.com/libp2p/go-buffer-pool v0.0.2
github.com/libp2p/go-libp2p v0.4.0 github.com/libp2p/go-libp2p v0.4.2
github.com/libp2p/go-libp2p-core v0.0.3 github.com/libp2p/go-libp2p-core v0.2.5
github.com/libp2p/go-libp2p-loggables v0.1.0 github.com/libp2p/go-libp2p-loggables v0.1.0
github.com/libp2p/go-libp2p-netutil v0.1.0 github.com/libp2p/go-libp2p-netutil v0.1.0
github.com/libp2p/go-libp2p-testing v0.0.4 github.com/libp2p/go-libp2p-testing v0.1.0
github.com/libp2p/go-msgio v0.0.4 github.com/libp2p/go-msgio v0.0.4
github.com/mattn/go-colorable v0.1.2 // indirect github.com/mattn/go-colorable v0.1.2 // indirect
github.com/multiformats/go-multiaddr v0.0.4 github.com/multiformats/go-multiaddr v0.1.2
github.com/opentracing/opentracing-go v1.1.0 // indirect github.com/opentracing/opentracing-go v1.1.0 // indirect
golang.org/x/crypto v0.0.0-20190611184440-5c40567a22f8 // indirect
golang.org/x/net v0.0.0-20190611141213-3f473d35a33a // indirect
golang.org/x/sys v0.0.0-20190610200419-93c9922d18ae // indirect
golang.org/x/text v0.3.2 // indirect
gopkg.in/yaml.v2 v2.2.2 // indirect
) )
go 1.12 go 1.12
This diff is collapsed.
...@@ -252,8 +252,8 @@ func (pqm *ProviderQueryManager) findProviderWorker() { ...@@ -252,8 +252,8 @@ func (pqm *ProviderQueryManager) findProviderWorker() {
} }
}(p) }(p)
} }
cancel()
wg.Wait() wg.Wait()
cancel()
select { select {
case pqm.providerQueryMessages <- &finishedProviderQueryMessage{ case pqm.providerQueryMessages <- &finishedProviderQueryMessage{
k: k, k: k,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment