From db7da4eb4f432f24968d3d5474f9e0c548dfbdf0 Mon Sep 17 00:00:00 2001 From: fundon Date: Sat, 24 Oct 2015 15:48:18 +0800 Subject: [PATCH] update bench case closes #544 --- benchmarks/middleware.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/benchmarks/middleware.js b/benchmarks/middleware.js index 66e0f4f..e082cf1 100644 --- a/benchmarks/middleware.js +++ b/benchmarks/middleware.js @@ -11,15 +11,15 @@ let n = parseInt(process.env.MW || '1', 10); console.log(` ${n} middleware`); while (n--) { - app.use(function *(next){ - yield *next; + app.use(function *(ctx, next){ + yield next(); }); } const body = new Buffer('Hello World'); -app.use(function *(next){ - yield *next; +app.use(function *(ctx, next){ + yield next(); this.body = body; });