Fixes connection error:

-----------------
2011-07-26 17:17:17Z WARN - Client: 1.2.3.4 unexpected connection error Error: EINVAL, Invalid argument

node.js:134
        throw e; // process.nextTick error, or 'error' event on first tick
        ^
Error: EINVAL, Invalid argument
    at doConnect (net.js:555:5)
    at Socket.connect (net.js:715:5)
    at Object.createConnection (net.js:265:5)
    at newConnection (/usr/local/lib/node/.npm/ldapjs/0.1.0/package/lib/client.js:145:15)
    at new Client (/usr/local/lib/node/.npm/ldapjs/0.1.0/package/lib/client.js:222:27)
    at Object.createClient (/usr/local/lib/node/.npm/ldapjs/0.1.0/package/lib/index.js:48:12)
    at Object.<anonymous> (/home/jwalnes/dev/ldap/auth.js:7:19)
    at Module._compile (module.js:402:26)
    at Object..js (module.js:408:10)
    at Module.load (module.js:334:31)
This commit is contained in:
Joe Walnes 2011-08-26 15:35:01 -05:00
parent 98aed9bada
commit 84b1926aac
1 changed files with 1 additions and 1 deletions

View File

@ -141,7 +141,7 @@ function Client(options) {
if (self.secure) { if (self.secure) {
c = tls.createConnection(self.connectOptions); c = tls.createConnection(self.connectOptions);
} else { } else {
c = net.createConnection(self.connectOptions); c = net.createConnection(self.connectOptions.port, self.connectOptions.host);
} }
assert.ok(c); assert.ok(c);