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
commit9efac4ad16768b6612e8e9fcdd1cf5079a2a727c (patch)
tree3a129406910c6bce88c74a307545e9d3201a63d8
parentadd back openapi generation. todo: find way to keep route text descriptions i... (diff)
downloadserver-9efac4ad16768b6612e8e9fcdd1cf5079a2a727c.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}`,
 		// );