This repository was archived by the owner on Jul 21, 2023. It is now read-only.
Commit de2c601 1 parent 5e5e04e commit de2c601 Copy full SHA for de2c601
File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -71,7 +71,9 @@ class QuerySelf extends EventEmitter {
71
71
this . _controller = new AbortController ( )
72
72
const signal = anySignal ( [ this . _controller . signal , timeoutController . signal ] )
73
73
// this controller will get used for lots of dial attempts so make sure we don't cause warnings to be logged
74
- setMaxListeners && setMaxListeners ( Infinity , signal )
74
+ try {
75
+ setMaxListeners && setMaxListeners ( Infinity , signal )
76
+ } catch { } // fails on node < 15.4
75
77
const found = await length ( await take ( this . _peerRouting . getClosestPeers ( this . _peerId . toBytes ( ) , {
76
78
signal
77
79
} ) , this . _count ) )
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ class QueryManager {
104
104
// so make sure we don't make a lot of noise in the logs
105
105
try {
106
106
setMaxListeners && setMaxListeners ( 0 , signal )
107
- } catch { } // fails on node < 15
107
+ } catch { } // fails on node < 15.4
108
108
109
109
const log = logger ( `libp2p:kad-dht:${ this . _lan ? 'lan' : 'wan' } :query:` + uint8ArrayToString ( key , 'base58btc' ) )
110
110
You can’t perform that action at this time.
0 commit comments