From e553c4ac4785ee1d2c57ed5d5303d6dff26929f9 Mon Sep 17 00:00:00 2001 From: Sam Wilkins Date: Tue, 17 Dec 2019 16:38:16 -0800 Subject: ipc --- src/server/session_manager/session_manager.ts | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/server') diff --git a/src/server/session_manager/session_manager.ts b/src/server/session_manager/session_manager.ts index d8b2f6e74..d5b366811 100644 --- a/src/server/session_manager/session_manager.ts +++ b/src/server/session_manager/session_manager.ts @@ -9,12 +9,15 @@ import { ChildProcess, exec, execSync } from "child_process"; import InputManager from "./input_manager"; import { identifier, logPath, crashPath, onWindows, pid, ports, heartbeat, recipient, latency, SessionState } from "./config"; const killport = require("kill-port"); +import * as IPC from "ipc-event-emitter"; process.on('SIGINT', endPrevious); let state: SessionState = SessionState.STARTING; const is = (...reference: SessionState[]) => reference.includes(state); const set = (reference: SessionState) => state = reference; + + const { registerCommand } = new InputManager({ identifier }); registerCommand("restart", [], async () => { -- cgit v1.2.3-70-g09d2