提交 ee3c3070 作者: Jeromy Johnson

Merge pull request #1174 from ipfs/fix/mdns-panic

hotfix: dont use nodes context because it might not be set yet
......@@ -292,7 +292,7 @@ func setupDiscoveryOption(d config.Discovery) DiscoveryOption {
func (n *IpfsNode) HandlePeerFound(p peer.PeerInfo) {
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)
if err != nil {
log.Warning("Failed to connect to peer found by discovery: ", err)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论