mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-22 10:22:39 +01:00
Add error handler for individual gateway sockets
This commit is contained in:
parent
98d318fd88
commit
9efac4ad16
@ -35,6 +35,9 @@ export async function Connection(
|
|||||||
socket.on("close", Close);
|
socket.on("close", Close);
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
socket.on("message", Message);
|
socket.on("message", Message);
|
||||||
|
|
||||||
|
socket.on("error", (err) => console.error("[Gateway]", err));
|
||||||
|
|
||||||
// console.log(
|
// console.log(
|
||||||
// `[Gateway] New connection from ${socket.ipAddress}, total ${this.clients.size}`,
|
// `[Gateway] New connection from ${socket.ipAddress}, total ${this.clients.size}`,
|
||||||
// );
|
// );
|
||||||
|
Loading…
Reference in New Issue
Block a user