diff --git a/src/packages/hub/proxy/handle-upgrade.ts b/src/packages/hub/proxy/handle-upgrade.ts index 555f7ab1bf..47e219ac66 100644 --- a/src/packages/hub/proxy/handle-upgrade.ts +++ b/src/packages/hub/proxy/handle-upgrade.ts @@ -23,6 +23,10 @@ export default function init( const re = new RegExp(proxy_regexp); async function handleProxyUpgradeRequest(req, socket, head): Promise { + socket.on("error", (err) => { + // server will crash sometimes without this: + logger.debug("WARNING -- websocket socket error", err); + }); const dbg = (...args) => { logger.silly(req.url, ...args); };