You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@rocketmq.apache.org by GitBox <gi...@apache.org> on 2022/09/05 09:31:10 UTC

[GitHub] [rocketmq] complone commented on pull request #5000: [flaky-test] fix Address already in use

complone commented on PR #5000:
URL: https://github.com/apache/rocketmq/pull/5000#issuecomment-1236761698

   > > only way to find an available port is try to occupy a port using 0 and release it, but this approach is not thread-safe.
   > 
   > No, we should not use this approach. Modify the main source code to accept a configured listening port `0` and reflect/update the actual listening port in server-config objects. Use the config in test cases as we do in `RemotingServerTest`
   I think such [changes](https://github.com/apache/rocketmq/pull/5000/files#diff-ee85830d5ccf3051cea017b2ea12299dd9c282bade28bc50061490f963c5c1ffR77) are in line with expectations. In fact, the default value of nettyServerConfig.getListenPort is 0. We do not need to implement the method for netty port compatibility in NettyRemotingServer.
   


-- 
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: dev-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org