1
0
Fork 0
mirror of https://github.com/anyproto/anytype-heart.git synced 2025-06-10 01:51:07 +09:00

GO-866 Log process kill error

This commit is contained in:
Mikhail Iudin 2023-04-25 18:17:59 +02:00
parent f34b950737
commit f1b14c22ff
No known key found for this signature in database
GPG key ID: FAAAA8BAABDFF1C0

View file

@ -84,7 +84,11 @@ func cleanupAfterOldProcess(exePath string, lockfile string) {
if isNotCurrentRun && !isMyProcess(exePath, proc) {
log.Warnf("Killing the old process.")
_ = proc.Kill()
time.Sleep(lockReleaseDelay)
err = proc.Kill()
if err != nil {
log.Errorf("Failed to kill the old process: %v", err)
} else {
time.Sleep(lockReleaseDelay)
}
}
}