diff --git a/History.md b/History.md index 6e312ee..3de7366 100644 --- a/History.md +++ b/History.md @@ -1,3 +1,7 @@ +HEAD +================== + + * update co 0.1.1 / 2013-12-19 ================== diff --git a/lib/application.js b/lib/application.js index 7ef2762..9036c82 100644 --- a/lib/application.js +++ b/lib/application.js @@ -94,13 +94,14 @@ app.use = function(fn){ app.callback = function(){ var mw = [respond].concat(this.middleware); var gen = compose(mw); + var fn = co(gen); var self = this; return function(req, res, next){ var ctx = self.createContext(req, res); next = next || ctx.onerror; ctx.onSocketError(next); - co.call(ctx, gen)(next); + fn.call(ctx, next); } }; diff --git a/package.json b/package.json index 4f4282b..2c1f00b 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,7 @@ ], "license": "MIT", "dependencies": { - "co": "~2.3.0", + "co": "~3.0.0", "debug": "*", "mime": "~1.2.11", "fresh": "~0.2.0",