mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Fix instance exit notification
Fix improper notification on Factorio server exit causing plugins and the instance tracking to fail.
This commit is contained in:
1 parent
99ac8f4f33
commit
75cd6d38db
6 files changed
+33
-32
No files matched your search
@@ -419,7 +419,7 @@ const outputHeuristics = [
|
||||
* output - invoked with parsed output from Factorio
|
||||
* rcon-ready - invoked when the RCON client has connected
|
||||
* game-ready - invoked when the server is finished starting up
|
||||
* stopped - invoked when the sterver has exited
|
||||
* exit - invoked when the sterver has exited
|
||||
*/
|
||||
class FactorioServer extends events.EventEmitter {
|
||||
/**
|
||||
@@ -636,7 +636,7 @@ class FactorioServer extends events.EventEmitter {
|
||||
this._gameReady = false;
|
||||
this._unexpected = [];
|
||||
|
||||
this.emit('stopped');
|
||||
this.emit("exit");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -678,6 +678,7 @@ class FactorioServer extends events.EventEmitter {
|
||||
);
|
||||
|
||||
this._attachStdio();
|
||||
this._server.once("exit", () => this.emit("exit"));
|
||||
|
||||
try {
|
||||
let [code, signal] = await events.once(this._server, 'exit');
|
||||
|
||||
Reference in new issue
Block a user