This commit is contained in:
React User
2026-05-02 20:22:35 +00:00
parent 2432062db8
commit 146510ddeb
170 changed files with 7411 additions and 1258 deletions
+4 -3
View File
@@ -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);
});
}