mirror of
https://gitee.com/mirrors/Spring-Cloud-Alibaba.git
synced 2021-06-26 13:25:11 +08:00
fix
This commit is contained in:
parent
fec6c6554c
commit
f60cb805c8
@ -22,7 +22,6 @@ import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.concurrent.atomic.AtomicBoolean;
|
||||
import java.util.concurrent.atomic.AtomicLong;
|
||||
|
||||
import com.alibaba.cloud.nacos.NacosDiscoveryProperties;
|
||||
import com.alibaba.cloud.nacos.NacosServiceManager;
|
||||
@ -52,8 +51,6 @@ public class NacosWatch implements ApplicationEventPublisherAware, SmartLifecycl
|
||||
|
||||
private final AtomicBoolean running = new AtomicBoolean(false);
|
||||
|
||||
private final AtomicLong nacosWatchIndex = new AtomicLong(0);
|
||||
|
||||
private ApplicationEventPublisher publisher;
|
||||
|
||||
private NacosServiceManager nacosServiceManager;
|
||||
@ -96,9 +93,9 @@ public class NacosWatch implements ApplicationEventPublisherAware, SmartLifecycl
|
||||
instances);
|
||||
instanceOptional.ifPresent(currentInstance -> {
|
||||
resetIfNeeded(currentInstance);
|
||||
});
|
||||
publisher.publishEvent(
|
||||
new HeartbeatEvent(this, nacosWatchIndex.getAndIncrement()));
|
||||
new HeartbeatEvent(this, currentInstance));
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
x
Reference in New Issue
Block a user