From 9eb89ce14f9e52e184c5a39c024e19164d250802 Mon Sep 17 00:00:00 2001 From: Scott Bronson Date: Thu, 3 Nov 2011 15:08:53 -0700 Subject: [PATCH] Call callback on connection error rather than just crashing node. --- limestone.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/limestone.js b/limestone.js index a0458c6..3588d40 100644 --- a/limestone.js +++ b/limestone.js @@ -131,6 +131,10 @@ exports.SphinxClient = function() { response_output = null; //var promise = new process.Promise(); + + server_conn.addListener('error', function(e) { + callback(e); + }); server_conn.addListener('connect', function () {