diff options
| author | Adam Soltys <[email protected]> | 2023-05-01 22:59:59 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2023-05-01 23:00:02 -0700 |
| commit | fd372fb25791bc285102c8c3b32405973ec18982 (patch) | |
| tree | 7b048de7805d40bed713c3b9dedaca6f117245f6 | |
| parent | 43e46a5f3d0ba1f5f316a5e34f3e7a78e921ca87 (diff) | |
| download | coinos-server-fd372fb25791bc285102c8c3b32405973ec18982.tar.gz coinos-server-fd372fb25791bc285102c8c3b32405973ec18982.zip | |
log socket errors
| -rw-r--r-- | lib/app.js | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -34,7 +34,13 @@ app.register(fastifyStatic, { prefix: "/public/" }); -app.register(fastifyWs); +app.register(fastifyWs, { + errorHandler: (err, conn, req, reply) => { + console.log(err); + conn.destroy(err); + }, +}); + app.register(socketServer); app.setErrorHandler((error, request, reply) => { |
