aahmed-se commented on a change in pull request #5024: Improve Port Manager
URL: https://github.com/apache/pulsar/pull/5024#discussion_r317798626
##########
File path:
managed-ledger/src/test/java/org/apache/bookkeeper/test/PortManager.java
##########
@@ -95,7 +97,9 @@ private synchronized static int probeFreePort(int port) {
port = basePort;
}
- try (ServerSocket ss = new ServerSocket(port)) {
+ try (ServerSocket ss = new ServerSocket()) {
+ ss.setReuseAddress(false);
+ ss.bind(new
InetSocketAddress(InetAddress.getByName("localhost"), port), 1);
Review comment:
the only constructor that made sense to use the backlog specifier was with
with no parameters.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services