Skip to content
Snippets Groups Projects
Commit a06ea140 authored by Simon Döring's avatar Simon Döring
Browse files

Fix bug where server discards commands sent during startup

parent 5bfb3339
No related branches found
No related tags found
No related merge requests found
import * as readline from 'readline';
export const readlineInterface = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
import { Socket } from 'socket.io';
import * as readline from 'readline';
import { socketIO } from './socket-io/socket-io';
import { handleSenderInit } from './socket-io/handlers/sender-handlers';
import { handleQueryState } from './socket-io/handlers/common-handlers';
import { readlineInterface } from './io-interface/readline-interface';
import { handleCommand } from './io-interface/handlers/input-handlers';
import { registerCleanupLogic } from './util/cleanup';
import { room } from './janus/janus-room';
......@@ -23,6 +23,12 @@ import { room } from './janus/janus-room';
socket.on('sender_init', handleSenderInit.bind(null, socket));
});
const readlineInterface = readline.createInterface({
input: process.stdin,
output: process.stdout,
terminal: false
});
readlineInterface.on('line', handleCommand);
registerCleanupLogic();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment