fix: return early if the ocis is not running

This commit is contained in:
Saw-jan committed 2024-07-09 11:48:03 +05:45
1 parent 86fd73e912
commit 9baecdfd58
1 file changed
+4
+4
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") {