aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2023-04-13 20:13:36 +0000
committerAdam Soltys <[email protected]>2023-04-13 20:13:38 +0000
commit812a8129251347f236b562417e850ec015cdc65a (patch)
treecca6d0d459684cac920bb2a8805e6109d50bf2ff /lib
parent36cdac82d7b52c6ea02b81afc93ebe2f5f743047 (diff)
downloadcoinos-server-812a8129251347f236b562417e850ec015cdc65a.tar.gz
coinos-server-812a8129251347f236b562417e850ec015cdc65a.zip
log socket errors
Diffstat (limited to 'lib')
-rw-r--r--lib/sockets.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/sockets.js b/lib/sockets.js
index 7be4936b..ba763fdc 100644
--- a/lib/sockets.js
+++ b/lib/sockets.js
@@ -51,7 +51,7 @@ export async function socketServer(app) {
app.get("/ws", { websocket: true }, (connection, req) => {
let { socket: ws } = connection;
- connection.on("error", console.log);
+ connection.on("error", (e) => err(e.message));
const id = v4();
ws.id = id;
@@ -133,7 +133,7 @@ export async function socketServer(app) {
}
});
- ws.on("error", console.log);
+ ws.on("error", (e) => err(e.message));
ws.on("close", function (code, reason) {
try {