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 race condition in setContext link that can leak subscription #8399

Merged

Conversation

sofianhn
Copy link
Contributor

Fixing a race condition in setContext link where a cancelled subscription before an operation.setContext is resolved will leak. #8398

Checklist:

  • If this PR is a new feature, please reference an issue where a consensus about the design was reached (not necessary for small changes)
  • Make sure all of the significant new logic is covered by tests

@apollo-cla
Copy link

@sofianhn: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/

Copy link
Contributor

@brainkim brainkim left a comment

Choose a reason for hiding this comment

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

lgtm

@hwillson hwillson added this to the June 2021 milestone Jun 22, 2021
Copy link
Member

@benjamn benjamn left a comment

Choose a reason for hiding this comment

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

LGTM2

@benjamn benjamn linked an issue Jun 22, 2021 that may be closed by this pull request
benjamn added a commit to sofianhn/apollo-client that referenced this pull request Jun 22, 2021
benjamn added a commit to sofianhn/apollo-client that referenced this pull request Jun 22, 2021
@benjamn benjamn force-pushed the 8398/fix-race-condition-set-context-link branch from 52d7b76 to 105deb3 Compare June 22, 2021 18:36
@benjamn benjamn force-pushed the 8398/fix-race-condition-set-context-link branch from 105deb3 to f28e5aa Compare June 22, 2021 18:37
@benjamn benjamn merged commit 2e19922 into apollographql:main Jun 22, 2021
@sofianhn sofianhn deleted the 8398/fix-race-condition-set-context-link branch June 23, 2021 01:27
@hwillson hwillson removed this from the MM-2021-06 milestone Jul 29, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

setContext link race condition can leak subscriptions
5 participants