From b4b0789d7a0712f45133eb703f3b5e56e2816a50 Mon Sep 17 00:00:00 2001 From: TJ Holowaychuk Date: Wed, 21 Aug 2013 19:50:32 -0700 Subject: [PATCH] fix .onerror bind for stream "error" handling --- lib/application.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); }