From 8380254638dde806ce38d3406ea6b4127cb2444b Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Sat, 22 Jul 2023 08:31:59 -0400 Subject: [PATCH] fix: missing return --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index ef59788..8f7daee 100644 --- a/src/index.ts +++ b/src/index.ts @@ -233,6 +233,7 @@ export class Socket extends Client { ([exists]: ErrTuple) => { if (!exists) { logErr("tried to write to closed socket"); + return; } this.callModule("socketWrite", { id: this.id, message }); }, @@ -245,6 +246,7 @@ export class Socket extends Client { ([exists]: ErrTuple) => { if (!exists) { logErr("tried to close a closed socket"); + return; } this.callModule("socketClose", { id: this.id }); },