From 0bd66caae92e0383179177a1134b0012f8526b65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=CC=81=20F=2E=20Romaniello?= Date: Wed, 10 Apr 2013 10:17:23 -0300 Subject: [PATCH] Fixes #127 - socket is closed issue with pools --- lib/client/client.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/client/client.js b/lib/client/client.js index 0784fc9..9dda196 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -691,6 +691,9 @@ Client.prototype.unbind = function unbind(callback) { return callback(); var req = new UnbindRequest(); + if (this.socket.listeners('error').length === 0) { + this.socket.once('error', function(){}); + } return this._send(req, 'unbind', null, callback); };