Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit 129ac77

Browse files
authoredJun 13, 2022
fix: onMessage assignment should be undefined not null (#4131)
Assign according to the type
1 parent 92155bc commit 129ac77

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed
 

‎packages/ipfs-core/src/components/libp2p.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,10 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId,
129129
})
130130
],
131131
streamMuxers: [
132-
new Mplex()
132+
new Mplex({
133+
// temporary fix until we can limit streams on a per-protocol basis
134+
maxStreamsPerConnection: Infinity
135+
})
133136
],
134137
connectionEncryption: [
135138
NOISE

‎packages/ipfs-core/src/components/pubsub.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export function createPubsub ({ network, config }) {
9898
// no more pubsub handlers, remove message listener
9999
if (Object.keys(handlers).length === 0) {
100100
libp2p.pubsub.removeEventListener('message', onMessage)
101-
onMessage = null
101+
onMessage = undefined
102102
}
103103
}
104104

0 commit comments

Comments
 (0)
This repository has been archived.