You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by il...@apache.org on 2018/12/10 05:32:50 UTC
[incubator-dubbo] branch master updated: Remove the log to
putRandomPort when one protocol use random port (#2931)
This is an automated email from the ASF dual-hosted git repository.
iluo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-dubbo.git
The following commit(s) were added to refs/heads/master by this push:
new c2a4c8d Remove the log to putRandomPort when one protocol use random port (#2931)
c2a4c8d is described below
commit c2a4c8d2477636d22030522786c42d6410da3373
Author: tswstarplanet <ts...@163.com>
AuthorDate: Mon Dec 10 13:32:45 2018 +0800
Remove the log to putRandomPort when one protocol use random port (#2931)
* optimize findConfigedPorts method of ServiceConfig to log only one time when userandom port
* move the log to method putRandomPort
---
.../src/main/java/org/apache/dubbo/config/ServiceConfig.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 66e8d7f..579acd0 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
@@ -170,6 +170,7 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
protocol = protocol.toLowerCase();
if (!RANDOM_PORT_MAP.containsKey(protocol)) {
RANDOM_PORT_MAP.put(protocol, port);
+ logger.warn("Use random available port(" + port + ") for protocol " + protocol);
}
}
@@ -654,7 +655,6 @@ public class ServiceConfig<T> extends AbstractServiceConfig {
portToBind = getAvailablePort(defaultPort);
putRandomPort(name, portToBind);
}
- logger.warn("Use random available port(" + portToBind + ") for protocol " + name);
}
}