mirror of
https://github.com/ipfs/kubo.git
synced 2025-07-01 02:30:39 +08:00
hotfix: dont use nodes context because it might not be set yet
This commit is contained in:
@ -292,7 +292,7 @@ func setupDiscoveryOption(d config.Discovery) DiscoveryOption {
|
|||||||
|
|
||||||
func (n *IpfsNode) HandlePeerFound(p peer.PeerInfo) {
|
func (n *IpfsNode) HandlePeerFound(p peer.PeerInfo) {
|
||||||
log.Warning("trying peer info: ", p)
|
log.Warning("trying peer info: ", p)
|
||||||
ctx, _ := context.WithTimeout(n.Context(), time.Second*10)
|
ctx, _ := context.WithTimeout(context.TODO(), time.Second*10)
|
||||||
err := n.PeerHost.Connect(ctx, p)
|
err := n.PeerHost.Connect(ctx, p)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Warning("Failed to connect to peer found by discovery: ", err)
|
log.Warning("Failed to connect to peer found by discovery: ", err)
|
||||||
|
Reference in New Issue
Block a user