Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 736b570

Browse files
simonojsumners
authored andcommitted
Document reconnect option. (#504)
* Fix typo. * Document `reconnect` option. Fixes #392
1 parent f1acfee commit 736b570

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

docs/client.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ client is:
3232
|tlsOptions |Additional options passed to TLS connection layer when connecting via `ldaps://` (See: The TLS docs for node.js)|
3333
|idleTimeout |Milliseconds after last activity before client emits idle event|
3434
|strictDN |Force strict DN parsing for client methods (Default is true)|
35+
|reconnect |Try to reconnect when the connection gets lost (Default is false)|
3536

3637
### Note On Logger
3738

@@ -48,9 +49,17 @@ Known compatible loggers are:
4849
## Connection management
4950

5051
As LDAP is a stateful protocol (as opposed to HTTP), having connections torn
51-
down from underneath you is can be difficult to deal with. Several mechanisms
52+
down from underneath you can be difficult to deal with. Several mechanisms
5253
have been provided to mitigate this trouble.
5354

55+
### Reconnect
56+
57+
You can provide a Boolean option indicating if a reconnect should be tried. For
58+
more sophisticated control, you can provide an Object with the properties
59+
`initialDelay` (default: `100`), `maxDelay` (default: `10000`) and
60+
`failAfter` (default: `Infinity`).
61+
After the reconnect you maybe need to [bind](#bind) again.
62+
5463

5564
## Common patterns
5665

0 commit comments

Comments
 (0)