*Backwards compat fix to ensure Protomux is stored on the stream

This commit is contained in:
Derrick Hammer 2023-04-07 20:52:49 -04:00
parent 556373c5bc
commit 2b12150d71
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 0 deletions

View File

@ -69,6 +69,9 @@ export class ProtocolManager {
this._swarm = swarm;
this._swarm.on("connection", (peer: any) => {
if (!peer.userData) {
peer.userData = null;
}
for (const protocol of this._protocols) {
Protomux.from(peer).pair(
{ protocol: protocol[0] },