Skip to content

Commit c0b5409

Browse files
committed
Merge pull request #87 from tcort/connect-option
README.md: fix name of onconnection function in docs
2 parents b72216f + 1ce1cbd commit c0b5409

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ You will also require the LDAP Development Libraries (on Ubuntu, `sudo apt-get i
4141

4242
Reconnection
4343
==========
44-
If the connection fails during operation, the client library will handle the reconnection, calling the function specified in the reconnect option. This callback is a good place to put bind()s and other things you want to always be in place.
44+
If the connection fails during operation, the client library will handle the reconnection, calling the function specified in the connect option. This callback is a good place to put bind()s and other things you want to always be in place.
4545

4646
You must close() the instance to stop the reconnect behavior.
4747

@@ -65,20 +65,20 @@ var ldap = new LDAP({
6565
attrs: '*', // default attribute list for future searches
6666
filter: '(objectClass=*)', // default filter for all future searches
6767
scope: LDAP.SUBTREE, // default scope for all future searches
68-
reconnect: function(), // optional function to call when connect/reconnect occurs
68+
connect: function(), // optional function to call when connect/reconnect occurs
6969
disconnect: function(), // optional function to call when disconnect occurs
7070
}, function(err) {
7171
// connected and ready
7272
});
7373

7474
```
7575
76-
The reconnect handler is called on initial connect as well, so this function is a really good place to do a bind() or any other things you want to set up for every connection.
76+
The connect handler is called on initial connect as well as on reconnect, so this function is a really good place to do a bind() or any other things you want to set up for every connection.
7777
7878
```js
7979
var ldap = new LDAP({
8080
uri: 'ldap://server',
81-
reconnect: function() {
81+
connect: function() {
8282
ldap.bind({
8383
binddn: 'cn=admin,dc=com',
8484
password: 'supersecret'

0 commit comments

Comments
 (0)