diff options
author | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-10 12:54:03 +1100 |
---|---|---|
committer | Madeline <46743919+MaddyUnderStars@users.noreply.github.com> | 2023-01-10 12:54:03 +1100 |
commit | f9ab60ce2582c0855c9507620484d973a4f8f53a (patch) | |
tree | 0b077473ee0a74edfd6e8809c5520a23258944ef | |
parent | add back openapi generation. todo: find way to keep route text descriptions i... (diff) | |
download | server-f9ab60ce2582c0855c9507620484d973a4f8f53a.tar.xz |
Add error handler for individual gateway sockets
-rw-r--r-- | src/gateway/events/Connection.ts | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gateway/events/Connection.ts b/src/gateway/events/Connection.ts index f3694c51..41b2ff3d 100644 --- a/src/gateway/events/Connection.ts +++ b/src/gateway/events/Connection.ts @@ -35,6 +35,9 @@ export async function Connection( socket.on("close", Close); // @ts-ignore socket.on("message", Message); + + socket.on("error", (err) => console.error("[Gateway]", err)); + // console.log( // `[Gateway] New connection from ${socket.ipAddress}, total ${this.clients.size}`, // ); |