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

make sure all intermediate stream bodies will be destroy #255

Merged
merged 1 commit into from
Apr 14, 2014

Conversation

dead-horse
Copy link
Member

make sure all intermediate stream bodies will be destroy and have error listener(ctx.onerror).

@jonathanong
Copy link
Member

i'm +1 to this, but of course this is slightly opinionated as to stream handling. i think TJ wanted to wait to see whether core was adding better error handling, but the last thing i want to do is rely on core to add or fix anything.

up to @visionmedia !

@fengmk2
Copy link
Member

fengmk2 commented Apr 9, 2014

+1, help user to clean up his leave trash.

@tj
Copy link
Member

tj commented Apr 10, 2014

cool ill review this and the other mods soon

@dead-horse
Copy link
Member Author

any suggestion for this one? @visionmedia

onFinished(this, destroy.bind(null, val));

// make sure all intermediate streams has an listenner on error
inject(val, this.ctx.onerror);
Copy link
Member

Choose a reason for hiding this comment

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

probably fine in most cases without this, I don't see people actually registering it themselves they'll just forget or whatever and onerror is semi-private anyway

@tj
Copy link
Member

tj commented Apr 14, 2014

LGTM

tj added a commit that referenced this pull request Apr 14, 2014
make sure all intermediate stream bodies will be destroy
@tj tj merged commit 95a78c3 into koajs:master Apr 14, 2014
@dead-horse dead-horse deleted the stream-body branch April 15, 2014 02:11
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.

4 participants