Skip to content

DefaultPayload.create(BytBuf data, ByteBuf metadata) should release given BB after content copying  #882

@OlegDokuka

Description

@OlegDokuka

Actual

DefaultPayload.create(BytBuf data, ByteBuf metadata) leaves given ByteBufs unreleased which differs from the behavior of ByteBufPayload which ensures that given content is released when ByteBufPayload is released

Expected

DefaultPayload.create(BytBuf data, ByteBuf metadata) releases the given ByteBufs so a user should not take care of that.

The source of such expectation can be found there -> https://github.com/rsocket-routing/rsocket-routing-broker/blob/master/rsocket-routing-broker-spring/src/main/java/io/rsocket/routing/broker/spring/cluster/ClusterJoinListener.java#L158

Also, a Payload can be counted as the last handler in the chain of ByteBufs processing and should take care of its releasing

cc/ @spencergibb @rstoyanchev

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions