Revert "local state: use synchronized access to internal maps"

This reverts commit 39a2d8d25e629823e183e384e8414171edcf4164.
This commit is contained in:
Frank Schroeder 2017-10-23 10:08:32 +02:00
parent fe0f7c961d
commit 655a24e383
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 1 additions and 1 deletions

View File

@ -341,7 +341,7 @@ func (l *State) AddCheck(check *structs.HealthCheck, token string) error {
// if there is a serviceID associated with the check, make sure it exists before adding it
// NOTE - This logic may be moved to be handled within the Agent's Addcheck method after a refactor
if check.ServiceID != "" && l.Service(check.ServiceID) == nil {
if check.ServiceID != "" && l.services[check.ServiceID] == nil {
return fmt.Errorf("Check %q refers to non-existent service %q", check.CheckID, check.ServiceID)
}