baomingyu commented on a change in pull request #2782:
URL: https://github.com/apache/incubator-inlong/pull/2782#discussion_r816701017



##########
File path: 
inlong-dataproxy/dataproxy-source/src/main/java/org/apache/inlong/dataproxy/source/tcp/InlongTcpChannelHandler.java
##########
@@ -191,28 +175,29 @@ private void addMetric(boolean result, long size, Event 
event) {
 
     /**
      * responsePackage
-     * 
+     *
+     * @param ctx
      * @param  code
-     * @param  e
      * @throws Exception
      */
-    private void responsePackage(ResultCode code, MessageEvent e)
+    private void responsePackage(ChannelHandlerContext ctx, ResultCode code)
             throws Exception {
         ResponseInfo.Builder builder = ResponseInfo.newBuilder();
         builder.setResult(code);
 
         // encode
         byte[] responseBytes = builder.build().toByteArray();
         //
-        ChannelBuffer buffer = ChannelBuffers.wrappedBuffer(responseBytes);
-
-        Channel remoteChannel = e.getChannel();
+        ByteBuf buffer = ByteBufAllocator.DEFAULT.buffer(responseBytes.length);
+        buffer.writeBytes(responseBytes);

Review comment:
       done




-- 
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]


Reply via email to