From 76823f7529c7b38d78da833729824088f62c2ee1 Mon Sep 17 00:00:00 2001 From: Raul Ochoa Date: Mon, 13 Jul 2015 15:06:22 +0200 Subject: [PATCH] No need to pass a reference to itself --- lib/cartodb/server.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/cartodb/server.js b/lib/cartodb/server.js index 3bfad338..27fd8fd9 100644 --- a/lib/cartodb/server.js +++ b/lib/cartodb/server.js @@ -257,8 +257,6 @@ module.exports = function(serverOptions) { ]; app.sendResponse = function(res, args) { - var that = this; - var statusCode; if ( res._windshaftStatusCode ) { // Added by our override of sendError @@ -294,7 +292,7 @@ module.exports = function(serverOptions) { } //console.log("Adding cache channel to route\n" + req.route.path + " not matching any in:\n" + // mapCreateRoutes.join("\n")); - app.addCacheChannel(that, req, this); + app.addCacheChannel(req, this); }, function sendResponse(err/*, added*/) { if ( err ) console.log(err + err.stack); @@ -579,7 +577,7 @@ module.exports = function(serverOptions) { // @param cb function(err, channel) will be called when ready. // the channel parameter will be null if nothing was added // - app.addCacheChannel = function(app, req, cb) { + app.addCacheChannel = function(req, cb) { // skip non-GET requests, or requests for which there's no response if ( req.method != 'GET' || ! req.res ) { cb(null, null); return; } if (req.profiler) {