Skip to content

Commit ad372da

Browse files
Ryland Degnanrobertroeser
authored andcommitted
Set refCnt back to 1 when recycling ByteBufPayload (#446)
1 parent 24691af commit ad372da

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

rsocket-core/src/main/java/io/rsocket/util/ByteBufPayload.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,7 @@ public static Payload create(ByteBuf data) {
159159

160160
public static Payload create(ByteBuf data, @Nullable ByteBuf metadata) {
161161
ByteBufPayload payload = RECYCLER.get();
162+
payload.setRefCnt(1);
162163
payload.data = data;
163164
payload.metadata = metadata;
164165
return payload;

0 commit comments

Comments
 (0)