michaeljmarshall commented on code in PR #16045:
URL: https://github.com/apache/pulsar/pull/16045#discussion_r897012262
##########
pulsar-proxy/src/main/java/org/apache/pulsar/proxy/server/DirectProxyHandler.java:
##########
@@ -233,7 +233,7 @@ private void writeHAProxyMessage() {
InetSocketAddress clientAddress = (InetSocketAddress)
inboundChannel.remoteAddress();
String sourceAddress =
clientAddress.getAddress().getHostAddress();
int sourcePort = clientAddress.getPort();
- InetSocketAddress proxyAddress = (InetSocketAddress)
inboundChannel.remoteAddress();
+ InetSocketAddress proxyAddress = (InetSocketAddress)
outboundChannel.localAddress();
Review Comment:
Should we also change the `instanceof` check in the conditional just above
this code? I don't know anything about this code other than the fact that the
names imply that the `inboundChannel.remoteAddress` should not be called twice
and assigned to different variables.
--
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]