We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d978518 commit ff0477bCopy full SHA for ff0477b
p2p/stream/common/streammanager/streammanager.go
@@ -504,7 +504,8 @@ func (sm *streamManager) discover(ctx context.Context) (<-chan libp2p_peer.AddrI
504
return nil, nil
505
}
506
507
- ctx2, _ := context.WithTimeout(ctx, discTimeout)
+ ctx2, cancel := context.WithTimeout(ctx, discTimeout)
508
+ defer cancel()
509
return sm.pf.FindPeers(ctx2, string(sm.myProtoID), discBatch)
510
511
0 commit comments