File tree Expand file tree Collapse file tree
src/main/java/com/rabbitmq/client/impl Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -383,7 +383,6 @@ public void writeFrame(Frame frame) throws IOException {
383383 private void doWriteFrame (Frame frame ) throws IOException {
384384 ByteBuffer bbPayload = frame .getByteBufferPayload ();
385385 if (bbPayload != null ) {
386- // Zero-copy path: write frame header, wrap the ByteBuffer body directly, write frame end
387386 int payloadSize = bbPayload .remaining ();
388387 ByteBuf header = this .channel .alloc ().buffer (7 );
389388 header .writeByte (frame .getType ());
@@ -396,8 +395,7 @@ private void doWriteFrame(Frame frame) throws IOException {
396395 end .writeByte (AMQP .FRAME_END );
397396
398397 ByteBuf composite = Unpooled .wrappedBuffer (header , body , end );
399- // this is for basicPublish, the channel will be flushed later
400- this .channel .write (composite , this .channel .voidPromise ());
398+ this .channel .writeAndFlush (composite , this .channel .voidPromise ());
401399 } else {
402400 ByteBuf bb = this .channel .alloc ().buffer (frame .size ());
403401 frame .writeToByteBuf (bb );
You can’t perform that action at this time.
0 commit comments