Skip to content
New issue

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

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

Already on GitHub? # to your account

fix: add Metadata flag when sending stream payload which has metadata #200

Merged
merged 3 commits into from
Jan 5, 2022

Conversation

viglucci
Copy link
Member

@viglucci viglucci commented Dec 11, 2021

Motivation:

Addresses #198

Modifications:

Add Metadata flag as needed when sending stream payload.

Result:

Metadata should be included in encoded payloads.

Signed-off-by: Kevin Viglucci <kviglucci@gmail.com>
Signed-off-by: Kevin Viglucci <kviglucci@gmail.com>
@viglucci viglucci force-pushed the hotfix/responder-metdata-flag branch from 7c1bea9 to d0e13a8 Compare December 11, 2021 22:55
@viglucci viglucci requested a review from OlegDokuka December 12, 2021 01:57
@@ -888,6 +888,10 @@ class RSocketMachineImpl<D, M> implements RSocketMachine<D, M> {
flags |= FLAGS.COMPLETE;
this._subscriptions.delete(streamId);
}
if (payload.metadata !== undefined) {
Copy link
Member

@OlegDokuka OlegDokuka Jan 3, 2022

Choose a reason for hiding this comment

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

Suggested change
if (payload.metadata !== undefined) {
if (payload.metadata != undefined) {

I would relax restriction here to make sure null also rejected there

Copy link
Member Author

Choose a reason for hiding this comment

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

I think would need to be payload.metadata !== undefined && payload.metadata !== null as null won't match undefined even without strict equality check. Latest commit should resolve this.

Signed-off-by: Kevin Viglucci <kviglucci@gmail.com>
@viglucci viglucci force-pushed the hotfix/responder-metdata-flag branch from 39a1fb3 to 639a967 Compare January 5, 2022 21:23
@viglucci viglucci requested a review from OlegDokuka January 5, 2022 21:23
@OlegDokuka OlegDokuka merged commit cdfa824 into master Jan 5, 2022
@viglucci viglucci deleted the hotfix/responder-metdata-flag branch January 26, 2022 02:52
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants