AlbumenJ commented on code in PR #15239:
URL: https://github.com/apache/dubbo/pull/15239#discussion_r1999981317
##########
dubbo-common/src/main/java/org/apache/dubbo/common/utils/NetUtils.java:
##########
@@ -123,7 +123,10 @@ public static synchronized int getAvailablePort(int port) {
if (USED_PORT.get(i)) {
continue;
}
- try (ServerSocket ignored = new ServerSocket(i)) {
+ try (ServerSocket serverSocket = new ServerSocket()) {
+ // SO_REUSEADDR should be enabled before bind.
+ serverSocket.setReuseAddress(true);
Review Comment:
Are there any systems which cannot support such configuration or will throw
exception here?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]