agent/proxycfg: fix dropped error in state.initWatchesMeshGateway() (#7267)

This commit is contained in:
Lars Lehtonen 2020-02-18 05:41:01 -08:00 committed by GitHub
parent b519cc73b5
commit 6bcd596539
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -292,6 +292,9 @@ func (s *state) initWatchesConnectProxy() error {
Connect: true, Connect: true,
Source: *s.source, Source: *s.source,
}, "upstream:"+u.Identifier(), s.ch) }, "upstream:"+u.Identifier(), s.ch)
if err != nil {
return err
}
case structs.UpstreamDestTypeService: case structs.UpstreamDestTypeService:
fallthrough fallthrough
@ -370,6 +373,9 @@ func (s *state) initWatchesMeshGateway() error {
err = s.cache.Notify(s.ctx, cachetype.CatalogDatacentersName, &structs.DatacentersRequest{ err = s.cache.Notify(s.ctx, cachetype.CatalogDatacentersName, &structs.DatacentersRequest{
QueryOptions: structs.QueryOptions{Token: s.token, MaxAge: 30 * time.Second}, QueryOptions: structs.QueryOptions{Token: s.token, MaxAge: 30 * time.Second},
}, datacentersWatchID, s.ch) }, datacentersWatchID, s.ch)
if err != nil {
return err
}
// Once we start getting notified about the datacenters we will setup watches on the // 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 // gateways within those other datacenters. We cannot do that here because we don't