You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2018/08/21 03:03:19 UTC
[GitHub] diecui1202 closed pull request #2267: fix issue system property
dubbo.service.delay invalid #1728
diecui1202 closed pull request #2267: fix issue system property dubbo.service.delay invalid #1728
URL: https://github.com/apache/incubator-dubbo/pull/2267
This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:
As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):
diff --git a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
index e9d5e6b567..6636266f4e 100644
--- a/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
+++ b/dubbo-config/dubbo-config-api/src/main/java/org/apache/dubbo/config/ServiceConfig.java
@@ -197,24 +197,11 @@ public synchronized void export() {
if (export == null) {
export = provider.getExport();
}
- if (delay == null) {
- delay = provider.getDelay();
- }
}
if (export != null && !export) {
return;
}
-
- if (delay != null && delay > 0) {
- delayExportExecutor.schedule(new Runnable() {
- @Override
- public void run() {
- doExport();
- }
- }, delay, TimeUnit.MILLISECONDS);
- } else {
- doExport();
- }
+ doExport();
}
protected synchronized void doExport() {
@@ -314,6 +301,19 @@ protected synchronized void doExport() {
if (path == null || path.length() == 0) {
path = interfaceName;
}
+ if (delay != null && delay > 0) {
+ delayExportExecutor.schedule(new Runnable() {
+ @Override
+ public void run() {
+ publish();
+ }
+ }, delay, TimeUnit.MILLISECONDS);
+ } else {
+ publish();
+ }
+ }
+
+ private synchronized void publish() {
doExportUrls();
ProviderModel providerModel = new ProviderModel(getUniqueServiceName(), this, ref);
ApplicationModel.initProviderModel(getUniqueServiceName(), providerModel);
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org