You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/05/12 14:20:10 UTC

[GitHub] [nifi] pgyori commented on a diff in pull request #6032: NIFI-10010: ListenTCP adds client certificate's Subject and Issuer DN…

pgyori commented on code in PR #6032:
URL: https://github.com/apache/nifi/pull/6032#discussion_r871442022


##########
nifi-nar-bundles/nifi-extension-utils/nifi-event-transport/src/main/java/org/apache/nifi/event/transport/netty/codec/SocketByteArrayMessageDecoder.java:
##########
@@ -38,7 +47,38 @@ public class SocketByteArrayMessageDecoder extends MessageToMessageDecoder<byte[
     protected void decode(final ChannelHandlerContext channelHandlerContext, final byte[] bytes, final List<Object> decoded) {
         final InetSocketAddress remoteAddress = (InetSocketAddress) channelHandlerContext.channel().remoteAddress();
         final String address = remoteAddress.getHostString();
-        final ByteArrayMessage message = new ByteArrayMessage(bytes, address);
+
+        ByteArrayMessage message = getMessageWithSslSessionStatus(channelHandlerContext, bytes, address);
+        if (message == null) {
+            message = new ByteArrayMessage(bytes, address);
+        }

Review Comment:
   This is a great idea, makes it much cleaner. Thanks!



-- 
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: issues-unsubscribe@nifi.apache.org

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