mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-15 23:24:52 +09:00
Fix host bricked on Factorio version check
If the FactorioVersionRequest throws the instance and host ends up bricked as the instance is left in an invalid starting state that can't be stopped.
This commit is contained in:
1 parent
0617552956
commit
f56605600f
2 files changed
+3
-1
No files matched your search
@@ -74,6 +74,7 @@ async function discoverInstances(instancesDir: string) {
|
||||
return instances;
|
||||
}
|
||||
|
||||
// Requests that wake up the instance is responsible for updating the instance state in case of errors.
|
||||
const instanceStartingMessages = new Set([
|
||||
lib.InstanceStartRequest.name,
|
||||
lib.InstanceLoadScenarioRequest.name,
|
||||
|
||||
@@ -637,9 +637,10 @@ end`.replace(/\r?\n/g, " ");
|
||||
}
|
||||
|
||||
async init(pluginInfos: lib.PluginNodeEnvInfo[]) {
|
||||
// After changing the status this function is responsible for calling notifyExit if it throws.
|
||||
this.notifyStatus("starting");
|
||||
const factorioVersions = await this.sendTo("controller", new lib.FactorioVersionsRequest());
|
||||
try {
|
||||
const factorioVersions = await this.sendTo("controller", new lib.FactorioVersionsRequest());
|
||||
await this._loadStats();
|
||||
await this.server.checkForUpdates(factorioVersions);
|
||||
await this.server.init();
|
||||
|
||||
Reference in new issue
Block a user