mirror of
https://github.com/status-im/consul.git
synced 2025-01-22 11:40:06 +00:00
Return every time lock acquisition fails
This commit is contained in:
parent
c34bcb45c6
commit
f877b9ecc4
@ -138,8 +138,12 @@ func (c *LockCommand) Run(args []string) int {
|
||||
c.Ui.Info("Attempting lock acquisition")
|
||||
}
|
||||
lockCh, err := lu.lockFn(c.ShutdownCh)
|
||||
if err != nil || lockCh == nil {
|
||||
c.Ui.Error(fmt.Sprintf("Lock acquisition failed: %s", err))
|
||||
if lockCh == nil {
|
||||
if err == nil {
|
||||
c.Ui.Error("Shutdown triggered during lock acquisition")
|
||||
} else {
|
||||
c.Ui.Error(fmt.Sprintf("Lock acquisition failed: %s", err))
|
||||
}
|
||||
return 1
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user