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

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>
@@ -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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants