Skip to content

Commit

Permalink
ServerListFilterExt add switch
Browse files Browse the repository at this point in the history
  • Loading branch information
GuoYL123 authored and liubao68 committed Nov 15, 2019
1 parent b3a058b commit fb517e9
Showing 1 changed file with 3 additions and 0 deletions.
Expand Up @@ -58,6 +58,9 @@ public ServiceCombServer chooseServer(Invocation invocation) {
List<ServiceCombServer> servers = invocation.getLocalContext(LoadbalanceHandler.CONTEXT_KEY_SERVER_LIST);
int serversCount = servers.size();
for (ServerListFilterExt filterExt : filters) {
if(!filterExt.enabled()) {
continue;
}
servers = filterExt.getFilteredListOfServers(servers, invocation);
if (servers.isEmpty() && serversCount > 0) {
LOGGER.warn("There are not servers exist after filtered by {}.", filterExt.getClass());
Expand Down

0 comments on commit fb517e9

Please sign in to comment.