forked from Mirrors/gomuks
main: don't stop server if it wasn't started
This commit is contained in:
parent
f3da677565
commit
1e347a4c00
1 changed files with 5 additions and 3 deletions
|
@ -217,9 +217,11 @@ func (gmx *Gomuks) DirectStop() {
|
|||
closer(websocket.StatusServiceRestart, "Server shutting down")
|
||||
}
|
||||
gmx.Client.Stop()
|
||||
err := gmx.Server.Close()
|
||||
if err != nil {
|
||||
gmx.Log.Error().Err(err).Msg("Failed to close server")
|
||||
if gmx.Server != nil {
|
||||
err := gmx.Server.Close()
|
||||
if err != nil {
|
||||
gmx.Log.Error().Err(err).Msg("Failed to close server")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue