Skip to content

Commit

Permalink
[SCB-2895]The findServices method returns data errors (#4674)
Browse files Browse the repository at this point in the history
  • Loading branch information
felixgis14 authored Jan 9, 2025
1 parent fe66fc6 commit 8cedd07
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ public List<ConsulDiscoveryInstance> findServiceInstances(String application, St
@Override
public List<String> findServices(String application) {
LOGGER.info("ConsulDiscovery findServices(application={})", application);
Map<String, Service> services = consulClient.agentClient().getServices();
return Lists.newArrayList(services.keySet());
Map<String, List<String>> response = consulClient.catalogClient().getServices().getResponse();
if (!CollectionUtils.isEmpty(response)) {
return Lists.newArrayList(response.keySet());
}
return Lists.newArrayList();
}

@Override
Expand Down

0 comments on commit 8cedd07

Please sign in to comment.