diff options
| author | Adam Soltys <[email protected]> | 2023-04-13 20:13:36 +0000 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-04-13 20:13:38 +0000 |
| commit | 812a8129251347f236b562417e850ec015cdc65a (patch) | |
| tree | cca6d0d459684cac920bb2a8805e6109d50bf2ff /lib | |
| parent | 36cdac82d7b52c6ea02b81afc93ebe2f5f743047 (diff) | |
| download | coinos-server-812a8129251347f236b562417e850ec015cdc65a.tar.gz coinos-server-812a8129251347f236b562417e850ec015cdc65a.zip | |
log socket errors
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/sockets.js | 4 |
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 { |
