zrlw commented on PR #15239: URL: https://github.com/apache/dubbo/pull/15239#issuecomment-2727851674
see ```SO_REUSEADDR``` at java.net.StandardSocketOptions, ``` Re-use address. An implementation allows this socket option to be set before the socket is bound or connected. Changing the value of this socket option after the socket is bound has no effect. The default value of this socket option is system dependent. ```  since the default value of SO_REUSEADDR is always true on some system, I didn't think of how to write appropriate testing case. ``` @Test void testRepeatedStatusChecking() { int port = NetUtils.getAvailablePort(); for (int i = 0; i < 1000; i++) { assertFalse(NetUtils.isPortInUsed(port)); } } ``` -- 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]
