Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure DeafultPayload#create methods copy ByteBuf content #993

Merged
merged 1 commit into from
Mar 3, 2021

Conversation

rstoyanchev
Copy link
Contributor

@rstoyanchev rstoyanchev commented Mar 2, 2021

The RSocketConnector method that takes a setupPayload as Payload, as documented, tries to make a copy of a ByteBufPayload in order to ensure it can be re-used (e.g. on reconnect). However, DefaultPayload#create wasn't really making a copy. This PR fixes that and ensures that DefaultPayload copies data and metadata from ByteBuf's.

This is likely a fix for #970.

Closes rsocketgh-970

Signed-off-by: Rossen Stoyanchev <rstoyanchev@vmware.com>
@rstoyanchev rstoyanchev changed the title Ensure SETUP payload is copied correctly Ensure DeafultPayload#create methods copy ByteBuf content Mar 3, 2021
Copy link
Member

@OlegDokuka OlegDokuka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SocketAcceptorInterceptor receive an unexpected payload object rather than receive a setup payload object
2 participants