From 422fed6ed41bf71f5acc252ec854f086014b360a Mon Sep 17 00:00:00 2001 From: Alberto Ricart Date: Wed, 4 May 2022 10:53:18 -0500 Subject: [PATCH] testing --- nats-base-client/protocol.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nats-base-client/protocol.ts b/nats-base-client/protocol.ts index 38b870f2..7ad9d9f6 100644 --- a/nats-base-client/protocol.ts +++ b/nats-base-client/protocol.ts @@ -442,7 +442,7 @@ export class ProtocolHandler implements Dispatcher { } processPing() { - this.transport.send(PONG_CMD); + this.transport.send(PONG_CMD).catch(() => {/*ignoring socket error*/}); } processPong() { @@ -667,7 +667,9 @@ export class ProtocolHandler implements Dispatcher { } }); if (cmds.length) { - this.transport.send(encode(cmds.join(""))); + this.transport.send(encode(cmds.join(""))).catch( + () => {/*ignoring socket error*/}, + ); } } @@ -722,7 +724,7 @@ export class ProtocolHandler implements Dispatcher { if (this.outbound.size()) { const d = this.outbound.drain(); - this.transport.send(d); + this.transport.send(d).catch(() => {/*ignoring socket error*/}); } }