quantranhong1999 commented on code in PR #1824:
URL: https://github.com/apache/james-project/pull/1824#discussion_r1435951611
##########
server/protocols/protocols-imap4/src/main/java/org/apache/james/imapserver/netty/HAProxyMessageHandler.java:
##########
@@ -68,8 +68,8 @@ public void channelRead(ChannelHandlerContext ctx, Object
msg) throws Exception
LOGGER.info("Connection from {} runs through {} proxy",
haproxyMsg.sourceAddress(), haproxyMsg.destinationAddress());
// Refresh MDC info to account for proxying
MDCBuilder boundMDC = IMAPMDCContext.boundMDC(ctx);
+ Flux.fromIterable(connectionChecks).concatMap(connectionCheck
->
connectionCheck.validate(InetSocketAddress.createUnresolved(haproxyMsg.sourceAddress(),
haproxyMsg.sourcePort()))).then().block();
Review Comment:
Why not just `InetSocketAddress abcxyz = new
InetSocketAddress(haproxyMsg.sourceAddress(), haproxyMsg.sourcePort())` and
reuse it above also to avoid recalculating the variable again?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]