mirror of https://github.com/status-im/consul.git
monitor: fix dropped error (#7206)
This commit is contained in:
parent
dda4e9c902
commit
26d706eecd
|
@ -64,6 +64,10 @@ func (c *cmd) Run(args []string) int {
|
||||||
eventDoneCh := make(chan struct{})
|
eventDoneCh := make(chan struct{})
|
||||||
if c.logJSON {
|
if c.logJSON {
|
||||||
logCh, err = client.Agent().MonitorJSON(c.logLevel, eventDoneCh, nil)
|
logCh, err = client.Agent().MonitorJSON(c.logLevel, eventDoneCh, nil)
|
||||||
|
if err != nil {
|
||||||
|
c.UI.Error(fmt.Sprintf("Error starting JSON monitor: %s", err))
|
||||||
|
return 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
logCh, err = client.Agent().Monitor(c.logLevel, eventDoneCh, nil)
|
logCh, err = client.Agent().Monitor(c.logLevel, eventDoneCh, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue