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 Subscriber is removed from sendingSubscriptions #962

Merged
merged 1 commit into from
Nov 25, 2020

Conversation

rstoyanchev
Copy link
Contributor

Fix for #961.

@rstoyanchev rstoyanchev added this to the 1.0.4 milestone Nov 20, 2020
@rstoyanchev rstoyanchev self-assigned this Nov 20, 2020
@rstoyanchev rstoyanchev changed the base branch from master to 1.0.x November 20, 2020 21:27
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.

Let's do it a little differently. Let's remove the subscriber right immediately at the onNext method. Spec says that in the case of NEXT_COMPLETE no frames should be sent.

Thus, we should consider only 3 possible outcomes:

onNext -> remove subscriber and send the NEXT_COMPLETE frame
only onComplete -> remove subscriber and send the COMPLETE frame
only onError -> remove subscriber and send the ERROR frame

if

onNext + onComplete (do nothing at onComplete)
onNext + onError (drop error at onError)

@rstoyanchev
Copy link
Contributor Author

Let's do it a little differently.

Good idea, I've updated the PR accordingly.

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

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

@rstoyanchev rstoyanchev merged commit ae94de0 into rsocket:1.0.x Nov 25, 2020
@rstoyanchev rstoyanchev deleted the 961-sendingSubscriptions branch November 25, 2020 20:32
@linux-china
Copy link
Contributor

@OlegDokuka could you release 1.0.4 to include this bug fix? it's very important for Spring Boot 2.3.X.

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.

3 participants