diff --git a/ipfs/pointers.go b/ipfs/pointers.go index c84284d88d..f79afcf5bc 100644 --- a/ipfs/pointers.go +++ b/ipfs/pointers.go @@ -89,6 +89,7 @@ func PutPointerToPeer(dht *routing.IpfsDHT, ctx context.Context, peer peer.ID, p func GetPointersFromPeer(dht *routing.IpfsDHT, ctx context.Context, p peer.ID, key *cid.Cid) ([]*ps.PeerInfo, error) { pmes := dhtpb.NewMessage(dhtpb.Message_GET_PROVIDERS, key.Bytes(), 0) + log.Debugf("Fetching pointers from: %v\n", p.Pretty()) resp, err := dht.SendRequest(ctx, p, pmes) if err != nil { return []*ps.PeerInfo{}, err diff --git a/net/retriever/retriever.go b/net/retriever/retriever.go index cbe765eab9..2a341e1446 100644 --- a/net/retriever/retriever.go +++ b/net/retriever/retriever.go @@ -234,12 +234,15 @@ func (m *MessageRetriever) getPointersFromDataPeersRoutine(peerOut chan ps.PeerI wg.Add(1) go func(pid peer.ID) { defer wg.Done() - ctx, cancel := context.WithTimeout(context.Background(), time.Second*5) + ctx, cancel := context.WithTimeout(context.Background(), time.Second*35) defer cancel() + time.Sleep(time.Second*15) provs, err := ipfs.GetPointersFromPeer(m.routing, ctx, pid, &k) if err != nil { + log.Errorf("Could not get pointers from push node because: %v", err) return } + log.Debugf("Successfully queried %s for pointers", pid.Pretty()) for _, pi := range provs { peerOut <- *pi }