0.5.2 broke pooled SSL
This commit is contained in:
parent
0da050009b
commit
9d984b72fc
|
@ -703,12 +703,12 @@ Client.prototype._connect = function _connect() {
|
|||
var socket = null;
|
||||
var timer = false;
|
||||
|
||||
socket = proto.connect((this.port || this.socketPath), this.host);
|
||||
|
||||
socket.once('connect', function onConnect() {
|
||||
if (timer)
|
||||
function onConnect() {
|
||||
if (timer)
|
||||
clearTimeout(timer);
|
||||
|
||||
socket.removeListener('connect', onConnect);
|
||||
socket.removeListener('secureConnect', onConnect);
|
||||
assert.ok(socket.ldap);
|
||||
|
||||
socket.ldap.id = nextClientId() + '__' + socket.ldap.id;
|
||||
|
@ -718,8 +718,12 @@ Client.prototype._connect = function _connect() {
|
|||
|
||||
self.socket = socket;
|
||||
self.emit('connect', socket);
|
||||
});
|
||||
}
|
||||
|
||||
socket = proto.connect((this.port || this.socketPath), this.host);
|
||||
|
||||
socket.once('connect', onConnect);
|
||||
socket.once('secureConnect', onConnect);
|
||||
setupSocket(socket, this);
|
||||
|
||||
if (this.connectTimeout) {
|
||||
|
|
|
@ -76,11 +76,13 @@ function createPool(options) {
|
|||
return callback(err);
|
||||
|
||||
res.on('error', function (e) {
|
||||
return callback(e);
|
||||
removeAllListeners('end');
|
||||
callback(e);
|
||||
});
|
||||
|
||||
return res.on('end', function () {
|
||||
return callback(null);
|
||||
res.on('end', function () {
|
||||
removeAllListeners('error');
|
||||
callback(null);
|
||||
});
|
||||
});
|
||||
},
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"name": "ldapjs",
|
||||
"homepage": "http://ldapjs.org",
|
||||
"description": "LDAP client and server APIs",
|
||||
"version": "0.5.2",
|
||||
"version": "0.5.3",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/mcavage/node-ldapjs.git"
|
||||
|
|
Loading…
Reference in New Issue