Kill process if rcon did not work
This commit is contained in:
parent
bb6fadd717
commit
6eb8d78036
1 changed files with 6 additions and 0 deletions
|
@ -107,6 +107,12 @@ class StateMachine {
|
||||||
print("Sending shutdown command to server");
|
print("Sending shutdown command to server");
|
||||||
await settings.sendRconCommand("shutdown");
|
await settings.sendRconCommand("shutdown");
|
||||||
|
|
||||||
|
Timer.periodic(Duration(seconds: 30), (timer) {
|
||||||
|
timer.cancel();
|
||||||
|
|
||||||
|
PROC!.kill();
|
||||||
|
});
|
||||||
|
|
||||||
changeState(States.Inactive);
|
changeState(States.Inactive);
|
||||||
} else if (currentState == States.Starting) {
|
} else if (currentState == States.Starting) {
|
||||||
// Server startup in progress
|
// Server startup in progress
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue