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

Change handling of end override so finish gets called at a more appropriate time #40

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

wpears
Copy link

@wpears wpears commented Jun 17, 2015

In the current version, by calling ws.originalEnd before cleaning up remaining data, a finish event is emitted which can cause problems if the user's code assumes finish means no more work will be done. I ran into this with pump, which will destroy a stream as soon as it gets a finish/close/end. Thus, the early finish was swallowing errors which would have otherwise been reported. Seems probable that, without this fix, the last flush of data could be accidentally blocked.

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.

1 participant