Merge pull request #128 from auth0/master

Fixes #127 - socket is closed issue with pools
This commit is contained in:
Mark Cavage 2013-04-10 09:26:40 -07:00
commit 7f33081240
1 changed files with 3 additions and 0 deletions

View File

@ -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);
};