promised-ldap icon indicating copy to clipboard operation
promised-ldap copied to clipboard

How to close connection in authenticate or authenticateUser method?

Open Aiman1017 opened this issue 2 years ago • 0 comments

Hi everyone,

First of all, thank you @CKarper and @sjmeverett for creating this simple and amazing ldap package.

After I run a few testing using the package, I discover error as below:

node:events:505
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at TLSWrap.onStreamRead (node:internal/stream_base_commons:217:20)
Emitted 'error' event on Client instance at:
    at TLSSocket.onSocketError (/usr/src/app/node_modules/promised-ldap/node_modules/ldapjs/lib/client/client.js:1169:12)
    at TLSSocket.emit (node:events:527:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  errno: -104,
  code: 'ECONNRESET',
  syscall: 'read'
}

How can I solved this error?

Aiman1017 avatar Jun 27 '22 02:06 Aiman1017