mirror of
https://github.com/fluencelabs/fluence-js.git
synced 2025-06-14 00:21:20 +00:00
fix: Increase number of inbound and outbound streams to 1024 (#280)
This commit is contained in:
@ -134,6 +134,12 @@ export class RelayConnection extends FluenceConnection {
|
|||||||
|
|
||||||
async connect(onIncomingParticle: ParticleHandler) {
|
async connect(onIncomingParticle: ParticleHandler) {
|
||||||
await this._lib2p2Peer.start();
|
await this._lib2p2Peer.start();
|
||||||
|
|
||||||
|
// TODO: make it configurable
|
||||||
|
const handleOptions = {
|
||||||
|
maxInboundStreams: 1024,
|
||||||
|
maxOutboundStreams: 1024
|
||||||
|
}
|
||||||
|
|
||||||
this._lib2p2Peer.handle([PROTOCOL_NAME], async ({ connection, stream }) => {
|
this._lib2p2Peer.handle([PROTOCOL_NAME], async ({ connection, stream }) => {
|
||||||
pipe(
|
pipe(
|
||||||
@ -156,7 +162,7 @@ export class RelayConnection extends FluenceConnection {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
}, handleOptions);
|
||||||
|
|
||||||
log.debug(`dialing to the node with client's address: ` + this._lib2p2Peer.peerId.toString());
|
log.debug(`dialing to the node with client's address: ` + this._lib2p2Peer.peerId.toString());
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user