fix .onerror bind for stream "error" handling

master
TJ Holowaychuk 2013-08-21 19:50:32 -07:00
parent 9d7720f2d8
commit b4b0789d7a
1 changed files with 1 additions and 1 deletions

View File

@ -192,7 +192,7 @@ function respond(next){
// Stream body
if (body instanceof Stream) {
body.on('error', this.error.bind(this));
body.on('error', this.onerror.bind(this));
if (head) return res.end();
return body.pipe(res);
}