This is an automated email from the ASF dual-hosted git repository.
albumenj pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new ff50f91 make sure change local serviceInstance after remote
operation. (#7798)
ff50f91 is described below
commit ff50f916a83ca32fc776fdf82eb6af9f45586fdd
Author: 赵延 <[email protected]>
AuthorDate: Thu May 20 23:29:22 2021 +0800
make sure change local serviceInstance after remote operation. (#7798)
---
.../org/apache/dubbo/registry/client/AbstractServiceDiscovery.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/AbstractServiceDiscovery.java
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/AbstractServiceDiscovery.java
index 6cdcc9f..f8e7646 100644
---
a/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/AbstractServiceDiscovery.java
+++
b/dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/AbstractServiceDiscovery.java
@@ -30,8 +30,8 @@ public abstract class AbstractServiceDiscovery implements
ServiceDiscovery {
@Override
public final void register(ServiceInstance serviceInstance) throws
RuntimeException {
- this.serviceInstance = serviceInstance;
doRegister(serviceInstance);
+ this.serviceInstance = serviceInstance;
}
/**
@@ -44,9 +44,9 @@ public abstract class AbstractServiceDiscovery implements
ServiceDiscovery {
if (!isInstanceUpdated(serviceInstance)) {
return;
}
- this.serviceInstance = serviceInstance;
doUpdate(serviceInstance);
resetInstanceUpdateKey(serviceInstance);
+ this.serviceInstance = serviceInstance;
}
/**