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

disable callbackWaitsForEmptyEventLoop #2638

Merged
merged 2 commits into from
May 13, 2019
Merged

Conversation

bluedusk
Copy link
Contributor

@bluedusk bluedusk commented May 1, 2019

Disable callbackWaitsForEmptyEventLoop for HTTP OPTIONS request since ApolloServer already disable callbackWaitsForEmptyEventLoop for POST request. (

context.callbackWaitsForEmptyEventLoop = false;
)

Otherwise is lambda event loop is not empty, subsequence HTTP OPTIONS request will be hang and even timeout without throwing proper error.

TODO:

  • Update CHANGELOG.md with your change (include reference to issue & this PR)
  • Make sure all of the significant new logic is covered by tests
  • Rebase your changes on master so that they can be merged easily
  • Make sure all tests and linter rules pass

Disable callbackWaitsForEmptyEventLoop for HTTP OPTIONS request since ApolloServer already disable callbackWaitsForEmptyEventLoop for POST request. (https://github.com/apollographql/apollo-server/blob/1ec2890397ca306350b0e1f33eec7b5f3f951d8d/packages/apollo-server-lambda/src/lambdaApollo.ts#L33)

Otherwise is lambda event loop is not empty, subsequence HTTP OPTIONS request will be hang and even timeout without throwing proper error.
@apollo-cla
Copy link

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

fix prettier issue
Copy link
Member

@abernix abernix left a comment

Choose a reason for hiding this comment

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

Makes sense to me. Thank you!

@abernix abernix merged commit 7fb5a29 into apollographql:master May 13, 2019
@abernix abernix added this to the Release 2.6.0 milestone May 13, 2019
abernix added a commit that referenced this pull request May 13, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 22, 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.

3 participants