mirror of
https://github.com/OpenFactorioServerManager/factorio-server-manager.git
synced 2025-01-26 05:27:21 +02:00
factorio output reports server stop
This commit is contained in:
parent
9dd4348570
commit
25e1946df7
@ -347,6 +347,11 @@ func (server *Server) parseRunningCommand(std io.ReadCloser) (err error) {
|
||||
log.Printf("Error: %s", err)
|
||||
}
|
||||
}
|
||||
|
||||
// server was stopped
|
||||
if strings.Contains(strings.Join(line, " "), "ServerMultiplayerManager.cpp:783: updateTick(0) changing state from(Disconnected) to(Closed)") {
|
||||
server.SetRunning(false)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,7 +41,6 @@ func (server *Server) Stop() error {
|
||||
log.Printf("Error sending SIGINT to Factorio process: %s", err)
|
||||
return err
|
||||
}
|
||||
server.SetRunning(false)
|
||||
log.Printf("Sent SIGINT to Factorio process. Factorio shutting down...")
|
||||
|
||||
err = server.Rcon.Close()
|
||||
|
@ -77,6 +77,5 @@ func (server *Server) Stop() error {
|
||||
// Re-enable handling of CTRL+C after we're sure that the factrio server is shut down.
|
||||
setCtrlHandlingIsDisabledForThisProcess(false)
|
||||
|
||||
server.SetRunning(false)
|
||||
return nil
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user