diff --git a/docs/examples.md b/docs/examples.md index ccbafb5..6c6b21c 100644 --- a/docs/examples.md +++ b/docs/examples.md @@ -555,7 +555,7 @@ $ ldapsearch -H ldap://localhost:389 -x -D cn=demo,dc=example,dc=com \ This example demonstrates multi-threading via the `cluster` module utilizing a `net` server for initial socket receipt. An alternate example demonstrating use of the `connectionRouter` `serverOptions` hook is available in the `examples` directory. -``` +```js const cluster = require('cluster'); const ldap = require('ldapjs'); const net = require('net'); diff --git a/lib/server.js b/lib/server.js index f50c7dd..74f2a67 100644 --- a/lib/server.js +++ b/lib/server.js @@ -314,6 +314,8 @@ function Server (options) { } self.newConnection = function (conn) { + // TODO: make `newConnection` available on the `Server` prototype + // https://github.com/ldapjs/node-ldapjs/pull/727/files#r636572294 setupConnection(conn) log.trace('new connection from %s', conn.ldap.id)