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/04/07 16:45:43 UTC

[GitHub] [rocketmq] luky116 commented on a diff in pull request #4010: fix mac 12+ slow bug

luky116 commented on code in PR #4010:
URL: https://github.com/apache/rocketmq/pull/4010#discussion_r845362700


##########
broker/src/main/java/org/apache/rocketmq/broker/processor/ReplyMessageProcessor.java:
##########
@@ -157,8 +158,10 @@ private PushReplyResult pushReplyMessage(final ChannelHandlerContext ctx,
         final SendMessageRequestHeader requestHeader,
         final Message msg) {
         ReplyMessageRequestHeader replyMessageRequestHeader = new ReplyMessageRequestHeader();
-        replyMessageRequestHeader.setBornHost(ctx.channel().remoteAddress().toString());
-        replyMessageRequestHeader.setStoreHost(this.getStoreHost().toString());
+        InetSocketAddress bornAddress =(InetSocketAddress)(ctx.channel().remoteAddress());
+        replyMessageRequestHeader.setBornHost(bornAddress.getHostName() + ":" + bornAddress.getPort());

Review Comment:
   I'm afraid not. If the service is in the form of IP address + port, the gethoststring method will lose 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: dev-unsubscribe@rocketmq.apache.org

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