mirror of https://github.com/status-im/consul.git
agent: pass error through when writing state files
This commit is contained in:
parent
79ba25b94d
commit
2ebe85414f
|
@ -645,7 +645,9 @@ func (a *Agent) AddService(service *structs.NodeService, chkType *CheckType) err
|
|||
a.state.AddService(service)
|
||||
|
||||
// Persist the service to a file
|
||||
a.persistService(service)
|
||||
if err := a.persistService(service); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// Create an associated health check
|
||||
if chkType != nil {
|
||||
|
|
Loading…
Reference in New Issue