mirror of https://github.com/status-im/consul.git
Merge pull request #1080 from zendesk/master
Return every time lock acquisition fails
This commit is contained in:
commit
cfa7ed71a7
|
@ -138,8 +138,12 @@ func (c *LockCommand) Run(args []string) int {
|
||||||
c.Ui.Info("Attempting lock acquisition")
|
c.Ui.Info("Attempting lock acquisition")
|
||||||
}
|
}
|
||||||
lockCh, err := lu.lockFn(c.ShutdownCh)
|
lockCh, err := lu.lockFn(c.ShutdownCh)
|
||||||
if err != nil || lockCh == nil {
|
if lockCh == nil {
|
||||||
c.Ui.Error(fmt.Sprintf("Lock acquisition failed: %s", err))
|
if err == nil {
|
||||||
|
c.Ui.Error("Shutdown triggered during lock acquisition")
|
||||||
|
} else {
|
||||||
|
c.Ui.Error(fmt.Sprintf("Lock acquisition failed: %s", err))
|
||||||
|
}
|
||||||
return 1
|
return 1
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue