mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-23 08:23:12 +09:00
Merge pull request #221 from Hornwitser/fix-socketio
Fix master socket.io broken by a3fc1dd
This commit is contained in:
1 file changed
+5
@@ -945,6 +945,7 @@ async function startServer() {
|
|||||||
if (httpPort) {
|
if (httpPort) {
|
||||||
let httpServer = require("http").Server(app);
|
let httpServer = require("http").Server(app);
|
||||||
await listen(httpServer, httpPort);
|
await listen(httpServer, httpPort);
|
||||||
|
io.attach(httpServer);
|
||||||
console.log("Listening for HTTP on port %s...", httpServer.address().port);
|
console.log("Listening for HTTP on port %s...", httpServer.address().port);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -965,6 +966,10 @@ async function startServer() {
|
|||||||
cert: certificate
|
cert: certificate
|
||||||
}, app)
|
}, app)
|
||||||
await listen(httpsServer, httpsPort);
|
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);
|
console.log("Listening for HTTPS on port %s...", httpsServer.address().port);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user