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

Commit

Permalink
fix: onMessage assignment should be undefined not null (#4131)
Browse files Browse the repository at this point in the history
Assign according to the type
  • Loading branch information
achingbrain committed Jun 13, 2022
1 parent 92155bc commit 129ac77
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion packages/ipfs-core/src/components/libp2p.js
Expand Up @@ -129,7 +129,10 @@ function getLibp2pOptions ({ options, config, datastore, keychainConfig, peerId,
})
],
streamMuxers: [
new Mplex()
new Mplex({
// temporary fix until we can limit streams on a per-protocol basis
maxStreamsPerConnection: Infinity
})
],
connectionEncryption: [
NOISE
Expand Down
2 changes: 1 addition & 1 deletion packages/ipfs-core/src/components/pubsub.js
Expand Up @@ -98,7 +98,7 @@ export function createPubsub ({ network, config }) {
// no more pubsub handlers, remove message listener
if (Object.keys(handlers).length === 0) {
libp2p.pubsub.removeEventListener('message', onMessage)
onMessage = null
onMessage = undefined
}
}

Expand Down

0 comments on commit 129ac77

Please sign in to comment.