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")
|
closer(websocket.StatusServiceRestart, "Server shutting down")
|
||||||
}
|
}
|
||||||
gmx.Client.Stop()
|
gmx.Client.Stop()
|
||||||
err := gmx.Server.Close()
|
if gmx.Server != nil {
|
||||||
if err != nil {
|
err := gmx.Server.Close()
|
||||||
gmx.Log.Error().Err(err).Msg("Failed to close server")
|
if err != nil {
|
||||||
|
gmx.Log.Error().Err(err).Msg("Failed to close server")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue