agent: pass error through when writing state files

This commit is contained in:
Ryan Uber 2014-11-24 01:58:39 -08:00
parent 79ba25b94d
commit 2ebe85414f
1 changed files with 3 additions and 1 deletions

View File

@ -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 {