use connect() instead of createConnection() as the tls api does not have createConnection

This commit is contained in:
Mark Cavage 2012-04-27 11:02:49 -07:00
parent 829c481d27
commit e378ae8474
3 changed files with 6 additions and 6 deletions

View File

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

View File

@ -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) {

View File

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