mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-21 16:13:12 +09:00
Remove redundant status check
This commit is contained in:
1 file changed
-3
@@ -1302,9 +1302,6 @@ end`.replace(/\r?\n/g, " ");
|
|||||||
}
|
}
|
||||||
|
|
||||||
async handleInstanceRestartRequest(request: lib.InstanceRestartRequest) {
|
async handleInstanceRestartRequest(request: lib.InstanceRestartRequest) {
|
||||||
if (this._status !== "running") {
|
|
||||||
throw new Error("Instance is not running");
|
|
||||||
}
|
|
||||||
await this.stop();
|
await this.stop();
|
||||||
// Stopping invalidates this instance object, a new one must be created by the host
|
// Stopping invalidates this instance object, a new one must be created by the host
|
||||||
// To do this we simulate a waking an instance and sending a start request
|
// To do this we simulate a waking an instance and sending a start request
|
||||||
|
|||||||
Reference in new issue
Block a user