Skip to content

Conversation

rushsky518
Copy link
Contributor

Optimize RemotingHelper#parseSocketAddressAddr

@coveralls
Copy link

Coverage Status

Coverage increased (+0.09%) to 50.987% when pulling eccbea6 on rushsky518:hostname into dd94362 on apache:develop.

@xujianhai666
Copy link
Member

@rushsky518 Is there more info about this? I can not understand the reason about this modification

@rushsky518
Copy link
Contributor Author

@xujianhai666
when producer.setNamesrvAddr("localhost:9876")

// org.apache.rocketmq.remoting.netty.NettyRemotingClient.NettyConnectManageHandler#connect
final String local = localAddress == null ? "UNKNOWN" : RemotingHelper.parseSocketAddressAddr(localAddress);
final String remote = remoteAddress == null ? "UNKNOWN" : RemotingHelper.parseSocketAddressAddr(remoteAddress);
log.info("NETTY CLIENT PIPELINE: CONNECT  {} => {}", local, remote);

remote is 'ocalhost/127.0.0.1:9876'

@yuz10 yuz10 linked an issue Dec 25, 2021 that may be closed by this pull request
@yuz10 yuz10 merged commit 75557b8 into apache:develop Dec 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display of SocketAddress
5 participants