From f6d3dd9f55020df93c8e7e116cb2ce1614b3404b Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Thu, 5 May 2022 10:34:33 +0100 Subject: [PATCH] fix: ignore missing stream (#169) Do not send a reset as this makes the protocol impossibly chatty. --- src/mplex.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/mplex.ts b/src/mplex.ts index 7003963..9ad0acf 100644 --- a/src/mplex.ts +++ b/src/mplex.ts @@ -4,7 +4,7 @@ import { abortableSource } from 'abortable-iterator' import { encode } from './encode.js' import { decode } from './decode.js' import { restrictSize } from './restrict-size.js' -import { MessageTypes, MessageTypeNames, Message, ReceiverMessageTypes, InitiatorMessageTypes } from './message-types.js' +import { MessageTypes, MessageTypeNames, Message } from './message-types.js' import { createStream } from './stream.js' import { toString as uint8ArrayToString } from 'uint8arrays' import { trackedMap } from '@libp2p/tracked-map' @@ -235,10 +235,6 @@ export class MplexStreamMuxer implements StreamMuxer { if (stream == null) { log('missing stream %s', id) - // send a reset - this._source.push({ id, type: InitiatorMessageTypes.RESET }) - this._source.push({ id, type: ReceiverMessageTypes.RESET }) - return }