Clean up dead code, issue addressed by passing ws to serviceGatewayNodes

This commit is contained in:
freddygv 2020-04-21 12:20:33 -06:00
parent a54f2fd055
commit e751b83a3f
1 changed files with 0 additions and 6 deletions

View File

@ -2035,7 +2035,6 @@ func (s *Store) checkServiceNodesTxn(tx *memdb.Txn, ws memdb.WatchSet, serviceNa
// Gateways are tracked in a separate table, and we append them to the result set.
// We append rather than replace since it allows users to migrate a service
// to the mesh with a mix of sidecars and gateways until all its instances have a sidecar.
var gatewayNodesCh <-chan struct{}
if connect {
// Look up gateway nodes associated with the service
_, nodes, _, err := s.serviceGatewayNodes(tx, ws, serviceName, structs.ServiceKindTerminatingGateway, entMeta)
@ -2105,11 +2104,6 @@ func (s *Store) checkServiceNodesTxn(tx *memdb.Txn, ws memdb.WatchSet, serviceNa
fallbackWS = ws
// We also need to watch the iterator from earlier too.
fallbackWS.Add(iter.WatchCh())
// This channel will be nil if there are no known associations between the service and a gateway
if gatewayNodesCh != nil {
fallbackWS.Add(gatewayNodesCh)
}
} else if connect {
// If this is a connect query then there is a subtlety to watch out for.
// In addition to watching the proxy service indexes for changes above, we