Skip to content

Commit

Permalink
Merge pull request #27 from koushikr/main
Browse files Browse the repository at this point in the history
Bug Fix : When the Collection of Services is empty the monitor should gracefully return
  • Loading branch information
santanusinha authored Nov 11, 2023
2 parents 5c740be + 4128c04 commit 6be956d
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ private void updateRegistry() {
final Map<Service, ServiceFinder<T, R>> updatedFinders = new HashMap<>();
try {
val services = serviceDataSource.services();
if(services.isEmpty()) {
log.debug("No services found for the service data source. Skipping update on the registry");
return;
}
val knownServiceFinders = finders.get();
val newFinders = services.stream()
.filter(service -> !knownServiceFinders.containsKey(service))
Expand Down

0 comments on commit 6be956d

Please sign in to comment.