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

Clears the invocation timeout if the invocation is a success. #121

Merged
merged 1 commit into from
Feb 13, 2019

Conversation

alexanderson1993
Copy link
Contributor

This resolves #120 which caused the locally served lambda to crash after its first invocation. This was because the invocation timeout wasn't being cleared, which caused the timeout error handler to call response.write after the function was finished.

This PR resolves the issue by capturing the timeout identifier and calling clearTimeout after the Promise.race has resolved.

@swyxio
Copy link
Contributor

swyxio commented Feb 13, 2019

thank you! honestly this is the kind of thing we should have tests for. i’ll review and release in a couple hours.

@swyxio swyxio merged commit 879211d into netlify:master Feb 13, 2019
@swyxio
Copy link
Contributor

swyxio commented Feb 13, 2019

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.

Error [ERR_STREAM_WRITE_AFTER_END]: write after end
2 participants