Skip to content

Commit f4c7bf2

Browse files
committed
use heap buffers in the default payload decoder
1 parent 1dc25a7 commit f4c7bf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

rsocket-core/src/main/java/io/rsocket/frame/decoder/DefaultPayloadDecoder.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ public Payload apply(ByteBuf byteBuf) {
5252
throw new IllegalArgumentException("unsupported frame type: " + type);
5353
}
5454

55-
ByteBuffer data = ByteBuffer.allocateDirect(d.readableBytes());
55+
ByteBuffer data = ByteBuffer.allocate(d.readableBytes());
5656
data.put(d.nioBuffer());
5757
data.flip();
5858

5959
if (m != null) {
60-
ByteBuffer metadata = ByteBuffer.allocateDirect(m.readableBytes());
60+
ByteBuffer metadata = ByteBuffer.allocate(m.readableBytes());
6161
metadata.put(m.nioBuffer());
6262
metadata.flip();
6363

0 commit comments

Comments
 (0)