Safety logic check, don't try to stop a stopped server when suspending; closes #2318
Couldn't actually reproduce this, but a good sanity check I guess.
This commit is contained in:
parent
0cd8dc2b5f
commit
c415abf971
|
@ -143,6 +143,7 @@ func (s *Server) SyncWithEnvironment() {
|
||||||
} else {
|
} else {
|
||||||
// Checks if the server is now in a suspended state. If so and a server process is currently running it
|
// Checks if the server is now in a suspended state. If so and a server process is currently running it
|
||||||
// will be gracefully stopped (and terminated if it refuses to stop).
|
// will be gracefully stopped (and terminated if it refuses to stop).
|
||||||
|
if s.GetState() != environment.ProcessOfflineState {
|
||||||
s.Log().Info("server suspended with running process state, terminating now")
|
s.Log().Info("server suspended with running process state, terminating now")
|
||||||
|
|
||||||
go func(s *Server) {
|
go func(s *Server) {
|
||||||
|
@ -152,3 +153,4 @@ func (s *Server) SyncWithEnvironment() {
|
||||||
}(s)
|
}(s)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user