fix: return early if the ocis is not running

This commit is contained in:
Saw-jan
2024-07-08 16:32:03 +05:45
parent 86fd73e912
commit 9baecdfd58

View File

@@ -117,6 +117,10 @@ func Stop() (bool, string) {
log.Println("Stopping oCIS server...")
stopSignal = true
if cmd == nil {
return true, "oCIS server is not running"
}
err := cmd.Process.Signal(syscall.SIGINT)
if err != nil {
if !strings.HasSuffix(err.Error(), "process already finished") {