From 0afc9c154be9f9ff339f87cf189f5d31ff55e504 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 4 Mar 2014 18:04:58 +0100 Subject: [PATCH] Cleanly catch exceptions from sendResponse Closes #178 --- NEWS.md | 1 + lib/cartodb/cartodb_windshaft.js | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/NEWS.md b/NEWS.md index 8c966959..491a3cc4 100644 --- a/NEWS.md +++ b/NEWS.md @@ -11,6 +11,7 @@ Enhancements: - Include API docs (#164) - Add "cacheDns" statsd setting in the example configs - Do not send duplicated stats on template instanciation + - Cleanly catch exceptions from sendResponse (#178) Bug fixes: diff --git a/lib/cartodb/cartodb_windshaft.js b/lib/cartodb/cartodb_windshaft.js index 0f7dead2..f3ec9587 100644 --- a/lib/cartodb/cartodb_windshaft.js +++ b/lib/cartodb/cartodb_windshaft.js @@ -109,6 +109,10 @@ var CartodbWindshaft = function(serverOptions) { function sendResponse(err, added) { if ( err ) console.log(err + err.stack); ws_sendResponse.apply(that, thatArgs); + return null; + }, + function finish(err) { + if ( err ) console.log(err + err.stack); } ); };