Skip to content

Conversation

@yuriykulikov
Copy link
Contributor

This closes Support CANCEL Frames for Request-Stream #48

Client will send a CANCEL frame for a dropped stream when the next payload is received for this stream and the server will inform the RSocket implementation that the stream is closed.

Motivation:

Closing the streams upon reception of a CANCEL frame allows to free up the resources (for example memory allocated for buffers).

Modifications:

For the client: in on_payload() check is_closed() and send CANCEL Frame if downstream is closed.
For the server: Streams returned by the RSocket implementation are wrapped in Aborable. When the CANCEL Frame is received, this Abortable is aborted.

Result:

CANCEL frames are send by the client and handled by the server.

Client will send a CANCEL frame for a dropped stream
when the next payload is received for this stream.
Copy link
Member

@jjeffcaii jjeffcaii left a comment

Choose a reason for hiding this comment

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

LGTM

@jjeffcaii jjeffcaii merged commit efad362 into rsocket:master Sep 1, 2021
@jjeffcaii
Copy link
Member

@yuriykulikov Thanks for your hard work! 👍

@yuriykulikov
Copy link
Contributor Author

@jjeffcaii thank you for a prompt review! I will be happy to make more contributions if I can.

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.

2 participants