Skip to content

Commit

Permalink
Remove the log to putRandomPort when one protocol use random port (ap…
Browse files Browse the repository at this point in the history
…ache#2931)

* optimize findConfigedPorts method of ServiceConfig to log only one time when userandom port

* move the log to method putRandomPort
  • Loading branch information
tswstarplanet authored and khanimteyaz committed Dec 17, 2018
1 parent 1d46c45 commit 00f2e48
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ private static void putRandomPort(String protocol, Integer port) {
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);
}
}

Expand Down Expand Up @@ -654,7 +655,6 @@ private Integer findConfigedPorts(ProtocolConfig protocolConfig, String name, Ma
portToBind = getAvailablePort(defaultPort);
putRandomPort(name, portToBind);
}
logger.warn("Use random available port(" + portToBind + ") for protocol " + name);
}
}

Expand Down

0 comments on commit 00f2e48

Please sign in to comment.