Skip to content

Commit e1aba03

Browse files
committed
optimize get channel remoteAddr in getProducerTable
1 parent e4b731c commit e1aba03

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

broker/src/main/java/org/apache/rocketmq/broker/client/ProducerManager.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,15 +85,15 @@ public ProducerTableInfo getProducerTable() {
8585
if (map.containsKey(group)) {
8686
map.get(group).add(new ProducerInfo(
8787
clientChannelInfo.getClientId(),
88-
clientChannelInfo.getChannel().remoteAddress().toString(),
88+
RemotingHelper.parseChannelRemoteAddr(clientChannelInfo.getChannel()),
8989
clientChannelInfo.getLanguage(),
9090
clientChannelInfo.getVersion(),
9191
clientChannelInfo.getLastUpdateTimestamp()
9292
));
9393
} else {
9494
map.put(group, new ArrayList<>(Collections.singleton(new ProducerInfo(
9595
clientChannelInfo.getClientId(),
96-
clientChannelInfo.getChannel().remoteAddress().toString(),
96+
RemotingHelper.parseChannelRemoteAddr(clientChannelInfo.getChannel()),
9797
clientChannelInfo.getLanguage(),
9898
clientChannelInfo.getVersion(),
9999
clientChannelInfo.getLastUpdateTimestamp()

0 commit comments

Comments
 (0)