summary refs log tree commit diff
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-10 12:54:03 +1100
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-01-10 12:54:03 +1100
commitf9ab60ce2582c0855c9507620484d973a4f8f53a (patch)
tree0b077473ee0a74edfd6e8809c5520a23258944ef
parentadd back openapi generation. todo: find way to keep route text descriptions i... (diff)
downloadserver-f9ab60ce2582c0855c9507620484d973a4f8f53a.tar.xz
Add error handler for individual gateway sockets
-rw-r--r--src/gateway/events/Connection.ts3
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}`,
 		// );