Unverified Commit 7f576cd0 authored by ma-xiao-guang-64's avatar ma-xiao-guang-64 Committed by GitHub
Browse files

解决粘包问题

解决粘包问题
parent c6d1f55d
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -33,6 +33,11 @@ public final class MySQLPacketCodec extends ByteToMessageCodec<AbstractMySQLSent
            in.resetReaderIndex();
            return;
        }
        if (readableBytes > payloadLength) {
            ByteBuf frame = in.readRetainedSlice(readableBytes - payloadLength);
            out.add(frame);
            return;
        }
        out.add(in);
    }