Skip to content

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