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

ensures streams are terminated if racing terminal and new stream #848

Merged
merged 1 commit into from May 26, 2020

Conversation

OlegDokuka
Copy link
Member

closes #846

This PR fixes the case when a new stream might have already been started but the terminal error was not put into the list, so the termination will omit that "half initiated" one so it will hang forever since UnboundedProcessor does not error when calling onNext.

As a fix, the termination operation is scheduled on the serializedScheduler so there is no racing between new requests and termination. Also, all the streams that were scheduled but have not observed termination do this check again on the first request method so if there is termination, this stream will be terminated immediately

Signed-off-by: Oleh Dokuka shadowgun@i.ua

@OlegDokuka OlegDokuka added the bug label May 21, 2020
@OlegDokuka OlegDokuka added this to the 1.0.1 milestone May 21, 2020
@OlegDokuka OlegDokuka force-pushed the bugfix/rsocket-streams-termination branch from 94ee131 to 5431886 Compare May 21, 2020 21:46
@OlegDokuka OlegDokuka added this to Done in Core May 21, 2020
@OlegDokuka OlegDokuka force-pushed the bugfix/rsocket-streams-termination branch 2 times, most recently from 98d6b03 to b84392b Compare May 22, 2020 07:53
Signed-off-by: Oleh Dokuka <shadowgun@i.ua>
@OlegDokuka OlegDokuka force-pushed the bugfix/rsocket-streams-termination branch from b84392b to d12d5dc Compare May 22, 2020 08:23
@OlegDokuka OlegDokuka merged commit bcee05b into master May 26, 2020
@OlegDokuka OlegDokuka deleted the bugfix/rsocket-streams-termination branch May 26, 2020 07:37
OlegDokuka added a commit that referenced this pull request Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Core
  
Done
Development

Successfully merging this pull request may close these issues.

Deadlock on Connection with Errors
2 participants