From 823b8e5ad5b64c63731c1cb9d5ea8956d917f960 Mon Sep 17 00:00:00 2001 From: Tilman Vatteroth Date: Wed, 5 Jul 2023 21:22:55 +0200 Subject: [PATCH] fix: don't block message receiving even despite the ready state This shouldn't be handled here. If both sides are following the protocol then there shouldn't be any messages before this side hasn't sent the ready answer. Signed-off-by: Tilman Vatteroth --- commons/src/message-transporters/message-transporter.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/commons/src/message-transporters/message-transporter.ts b/commons/src/message-transporters/message-transporter.ts index b11213b7c..0e3dbe032 100644 --- a/commons/src/message-transporters/message-transporter.ts +++ b/commons/src/message-transporters/message-transporter.ts @@ -44,10 +44,6 @@ export class MessageTransporter extends EventEmitter2 { return } - if (this.transportAdapter === undefined) { - throw new Error('no transport adapter set') - } - try { this.transportAdapter.send(content) } catch (error: unknown) { @@ -87,9 +83,6 @@ export class MessageTransporter extends EventEmitter2 { this.processReadyAnswer() return } - if (!this.isReady()) { - return - } this.emit(message.type, message) }