use connect() instead of createConnection() as the tls api does not have createConnection
This commit is contained in:
parent
829c481d27
commit
e378ae8474
|
@ -728,9 +728,9 @@ Client.prototype._connect = function _connect() {
|
|||
self.emit('connect', socket);
|
||||
}
|
||||
|
||||
socket = proto.createConnection((this.port || this.socketPath),
|
||||
(this.host ? this.host : onConnect),
|
||||
(this.host ? onConnect : undefined));
|
||||
socket = proto.connect((this.port || this.socketPath),
|
||||
(this.host ? this.host : onConnect),
|
||||
(this.host ? onConnect : undefined));
|
||||
|
||||
setupSocket(socket, this);
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ function createPool(options) {
|
|||
max: options.maxConnections,
|
||||
maxIdleTime: options.maxIdleTime,
|
||||
|
||||
create: function createConnection(callback) {
|
||||
create: function createClient(callback) {
|
||||
var client = new Client(options);
|
||||
|
||||
client.once('error', function (err) {
|
||||
|
|
|
@ -132,12 +132,12 @@ test('setup', function (t) {
|
|||
client = ldap.createClient({
|
||||
socketPath: SOCKET,
|
||||
maxConnections: process.env.LDAP_MAX_CONNS || 5,
|
||||
idleTimeoutMillis: 10,
|
||||
log: new Logger({
|
||||
name: 'ldapjs_unit_test',
|
||||
stream: process.stderr,
|
||||
level: (process.env.LOG_LEVEL || 'info'),
|
||||
serializers: Logger.stdSerializers,
|
||||
idleTimeoutMillis: 10
|
||||
serializers: Logger.stdSerializers
|
||||
})
|
||||
});
|
||||
t.ok(client);
|
||||
|
|
Loading…
Reference in New Issue