From 83a3136b5a0222e6d6ed43f8db6bae6fda6c321d Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Tue, 18 Feb 2020 05:41:01 -0800 Subject: [PATCH] agent/proxycfg: fix dropped error in state.initWatchesMeshGateway() (#7267) --- agent/proxycfg/state.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/agent/proxycfg/state.go b/agent/proxycfg/state.go index 8c5327638..25167bdee 100644 --- a/agent/proxycfg/state.go +++ b/agent/proxycfg/state.go @@ -292,6 +292,9 @@ func (s *state) initWatchesConnectProxy() error { Connect: true, Source: *s.source, }, "upstream:"+u.Identifier(), s.ch) + if err != nil { + return err + } case structs.UpstreamDestTypeService: fallthrough @@ -370,6 +373,9 @@ func (s *state) initWatchesMeshGateway() error { err = s.cache.Notify(s.ctx, cachetype.CatalogDatacentersName, &structs.DatacentersRequest{ QueryOptions: structs.QueryOptions{Token: s.token, MaxAge: 30 * time.Second}, }, datacentersWatchID, s.ch) + if err != nil { + return err + } // Once we start getting notified about the datacenters we will setup watches on the // gateways within those other datacenters. We cannot do that here because we don't