Skip to content

Commit

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

* 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 beiwei30 committed Dec 10, 2018
1 parent fe456d9 commit c2a4c8d
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 c2a4c8d

Please sign in to comment.