Hook up shared process sorta

This commit is contained in:
Asher
2019-01-18 18:04:24 -06:00
committed by Kyle Carberry
parent d827015b40
commit 811260cc80
15 changed files with 198 additions and 246 deletions

View File

@ -117,9 +117,11 @@ export class Entry extends Command {
app.wss.on("connection", (ws, req) => {
const id = clientId++;
if (sharedProcess.state === SharedProcessState.Ready) {
sendSharedProcessReady(ws);
}
ws.on("open", () => {
if (sharedProcess.state === SharedProcessState.Ready) {
sendSharedProcessReady(ws);
}
});
logger.info(`WebSocket opened \u001B[0m${req.url}`, field("client", id), field("ip", req.socket.remoteAddress));