fix rule ip support

This commit is contained in:
ken.lj 2020-11-10 10:52:19 +08:00
parent 03abe135dc
commit 62f0902ef2
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ public class MigrationRuleHandler<T> {
try {
rule = MigrationRule.parse(rawRule);
// FIXME, consumerURL.getHost() might not exactly the ip expected.
if (rule.getTargetIps() != null && rule.getTargetIps().contains(consumerURL.getHost())) {
if (rule.getTargetIps() == null || (rule.getTargetIps() != null && rule.getTargetIps().contains(consumerURL.getHost()))) {
setMigrationRule(rule);
step = rule.getStep(consumerURL.getServiceKey());
threshold = rule.getThreshold(consumerURL.getServiceKey());