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

Always teardown subscriptions on completion #846

Merged
merged 2 commits into from Aug 24, 2022

Conversation

fathyb
Copy link
Contributor

@fathyb fathyb commented Aug 23, 2022

Always clear SubscriptionConnection.subscriptionContexts and SubscriptionConnection.subscriptionIters after a subscription completes, instead of waiting for the client to send a complete message.

This prevents buggy clients from leaking memory on the server.

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

Thanks for opening a PR! Can you please add a unit test?

Copy link
Collaborator

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@fathyb fathyb changed the title Always teardown GQL subscriptions on completion Always teardown subscriptions on completion Aug 23, 2022
@mcollina mcollina merged commit e7baf2b into mercurius-js:master Aug 24, 2022
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