fix: Read service count returned from the list instead of the Count field (#476)

This commit is contained in:
Kent Dong
2023-08-10 09:26:00 +08:00
committed by GitHub
parent 1f154c59f1
commit 35d5669b51
2 changed files with 2 additions and 2 deletions

View File

@@ -317,7 +317,7 @@ func (w *watcher) fetchAllServices() error {
for _, serviceName := range ss.Doms {
fetchedServices[groupName+DefaultJoiner+serviceName] = true
}
if ss.Count < DefaultFetchPageSize {
if len(ss.Doms) < DefaultFetchPageSize {
break
}
}

View File

@@ -238,7 +238,7 @@ func (w *watcher) fetchAllServices() error {
for _, serviceName := range ss.Doms {
fetchedServices[groupName+DefaultJoiner+serviceName] = true
}
if ss.Count < DefaultFetchPageSize {
if len(ss.Doms) < DefaultFetchPageSize {
break
}
}