prod v1
This commit is contained in:
+4
-3
@@ -1,4 +1,5 @@
|
||||
import { spawn } from 'child_process';
|
||||
import { logGameExit, logGameStderr } from './server_log';
|
||||
|
||||
export function GetRandomPort(min: number, max: number): number {
|
||||
return randomIntFromInterval(min, max);
|
||||
@@ -16,11 +17,11 @@ export function OpenGameInstance(path: string, port: number, matchId?: number):
|
||||
});
|
||||
|
||||
child.stderr.on('data', (data: Buffer) => {
|
||||
console.log('stderr: ' + data);
|
||||
logGameStderr(port, data);
|
||||
});
|
||||
|
||||
child.on('close', (code: number) => {
|
||||
console.log('Game instance with port ' + port + " exited with code " + code);
|
||||
child.on('close', (code: number | null) => {
|
||||
logGameExit(port, code);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user