🎨 Clean code

Signed-off-by: Daniel <845765@qq.com>
This commit is contained in:
Daniel 2025-09-27 20:09:46 +08:00
parent dc7685a262
commit 7ebf3e4c7a
No known key found for this signature in database
GPG key ID: 86211BA83DF03017

View file

@ -693,7 +693,9 @@ func Close(force, setCurrentWorkspace bool, execInstallPkg int) (exitCode int) {
go func() {
time.Sleep(500 * time.Millisecond)
logging.LogInfof("exited kernel")
util.WebSocketServer.Close()
if nil != util.WebSocketServer {
util.WebSocketServer.Close()
}
util.HttpServing = false
os.Exit(logging.ExitCodeOk)
}()