mirror of
https://github.com/status-im/consul.git
synced 2025-01-25 21:19:12 +00:00
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)
|
a.state.AddService(service)
|
||||||
|
|
||||||
// Persist the service to a file
|
// Persist the service to a file
|
||||||
a.persistService(service)
|
if err := a.persistService(service); err != nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
// Create an associated health check
|
// Create an associated health check
|
||||||
if chkType != nil {
|
if chkType != nil {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user