Skip to content

Commit

Permalink
Account for infinite
Browse files Browse the repository at this point in the history
  • Loading branch information
jscheinblum committed Mar 22, 2024
1 parent 578c4e8 commit 06538a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions go/vt/vtgateproxy/discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,8 @@ func (r *JSONGateConfigResolver) loadConfig() (*[]resolver.Address, []byte, erro
// Nothing in the filtered list? Get them all
if len(filteredAddrs) == 0 {
addrs = allAddrs
} else if *numConnectionsInt == 0 {
addrs = allAddrs
} else if len(filteredAddrs) > *numConnectionsInt {
addrs = filteredAddrs[0:*numConnectionsInt]
} else if len(allAddrs) > *numConnectionsInt {
Expand Down

0 comments on commit 06538a5

Please sign in to comment.