From 61d437d7469e87ef3742294993d15bf7bafdf26d Mon Sep 17 00:00:00 2001 From: Jonathan Ong Date: Thu, 19 Dec 2013 23:13:37 -0800 Subject: [PATCH] remove `next` in callback for now revisit mounting later --- lib/application.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/application.js b/lib/application.js index 9036c82..00a63d8 100644 --- a/lib/application.js +++ b/lib/application.js @@ -97,11 +97,10 @@ app.callback = function(){ var fn = co(gen); var self = this; - return function(req, res, next){ + return function(req, res){ var ctx = self.createContext(req, res); - next = next || ctx.onerror; - ctx.onSocketError(next); - fn.call(ctx, next); + ctx.onSocketError(ctx.onerror); + fn.call(ctx, ctx.onerror); } };