mirror of
https://github.com/clusterio/clusterio.git
synced 2026-11-19 23:33:13 +09:00
Add stopping instance status
Notify when an instance is in the process of stopping with a separate status for it. This makes handling shutdown gracefully a bit simpler in plugin code.
This commit is contained in:
1 parent
f6ab825692
commit
d3ea85d5ac
3 files changed
+7
-4
No files matched your search
@@ -224,7 +224,7 @@ class Instance extends libLink.Link {
|
||||
/**
|
||||
* Current state of the instance
|
||||
*
|
||||
* One of stopped, starting, running, creating_save and exporting_data
|
||||
* One of stopped, starting, running, stopping, creating_save and exporting_data
|
||||
*
|
||||
* @returns {string} instance status.
|
||||
*/
|
||||
@@ -623,6 +623,7 @@ class Instance extends libLink.Link {
|
||||
*/
|
||||
async stop() {
|
||||
this._running = false;
|
||||
this.notifyStatus("stopping");
|
||||
|
||||
// XXX this needs more thought to it
|
||||
if (this.server._state === "running") {
|
||||
|
||||
Reference in new issue
Block a user