Closed knoxfighter closed 2 years ago
I would suggest watching for "Factorio server stopped" in the console output of factorio instead of setting running to false directly. This could be done in parseRunningCommand.
Like suggested, I did some changes. The pull request is a draft, because there is a possible downside: If there is any problem shutting down factorio, the server might not be set as stopped. This might be an edge case, which will never happen.
What do you think?
Additionally, it would be a good enhancement to add a spinner to the start and stop button while executing the action.
The server is reported as stopped and can be started again, before it really stopped. Especially on large maps, the server is reported as stopped, when it is still saving the map. This results, that it is possible to start it again, while it is still running, which again will result in factorio failing to start, cause it is still running.