mirror of
https://github.com/restic/restic.git
synced 2025-03-16 00:00:05 +01:00
Don't defer until we have checked the error.
This commit is contained in:
parent
9f9c2a2be0
commit
0fb1ad40f2
1 changed files with 1 additions and 1 deletions
2
lock.go
2
lock.go
|
@ -203,11 +203,11 @@ func (l *Lock) Stale() bool {
|
|||
}
|
||||
|
||||
proc, err := os.FindProcess(l.PID)
|
||||
defer proc.Release()
|
||||
if err != nil {
|
||||
debug.Log("Lock.Stale", "error searching for process %d: %v\n", l.PID, err)
|
||||
return true
|
||||
}
|
||||
defer proc.Release()
|
||||
|
||||
debug.Log("Lock.Stale", "sending SIGHUP to process %d\n", l.PID)
|
||||
err = proc.Signal(syscall.SIGHUP)
|
||||
|
|
Loading…
Add table
Reference in a new issue