From 23ce86aef6038dfbcf1fcca597133ce4c67a8b7a Mon Sep 17 00:00:00 2001 From: Hornwitser Date: Mon, 2 Sep 2019 23:21:46 +0200 Subject: [PATCH] Fix master socket.io broken by a3fc1dd Add missing attach calls to the master socket.io object that was accidentally removed by the refactoring in a3fc1dd. Unfortunately I've been unable to determine if socket.io actually supports listening on multiple servers at the same time, this needs further investigation. --- master.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/master.js b/master.js index dc68b2a4..17b0acb9 100644 --- a/master.js +++ b/master.js @@ -945,6 +945,7 @@ async function startServer() { if (httpPort) { let httpServer = require("http").Server(app); await listen(httpServer, httpPort); + io.attach(httpServer); console.log("Listening for HTTP on port %s...", httpServer.address().port); } @@ -965,6 +966,10 @@ async function startServer() { cert: certificate }, app) await listen(httpsServer, httpsPort); + + // XXX I'm uncertain whether or not socket.io actually supports + // attaching to multiple servers at the same time. + io.attach(httpsServer); console.log("Listening for HTTPS on port %s...", httpsServer.address().port); } }