diff --git a/lib/application.js b/lib/application.js index d12f641..7a4c318 100644 --- a/lib/application.js +++ b/lib/application.js @@ -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); }