jbertram commented on code in PR #5908:
URL: https://github.com/apache/activemq-artemis/pull/5908#discussion_r2334175593


##########
artemis-server/src/main/java/org/apache/activemq/artemis/core/protocol/ProtocolHandler.java:
##########
@@ -184,7 +208,9 @@ public void channelRead(ChannelHandlerContext ctx, Object 
msg) throws Exception
                ctx.writeAndFlush(new DefaultFullHttpResponse(HTTP_1_1, 
FORBIDDEN)).addListener(ChannelFutureListener.CLOSE);
             }
          } else {
-            super.channelRead(ctx, msg);
+            // slice off the proxy-related bytes that have already been read 
so other protocol handlers don't choke on them
+            super.channelRead(ctx, skipProxyBytes ? ((ByteBuf) msg).slice() : 
msg);
+            skipProxyBytes = false;

Review Comment:
   I refactored the logic into a customer handler. 
   
   FWIW, AFAICT this was actually required in order to get the SSL stuff to 
work.



-- 
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]
For further information, visit: https://activemq.apache.org/contact


Reply via email to