From 96b8ad9d6b6d16902d6786bc1e12623652d3e4a7 Mon Sep 17 00:00:00 2001 From: Clement Michaud Date: Sun, 29 Jan 2017 15:02:20 +0100 Subject: [PATCH] Add error handling on ldap client to avoid crash on ECONNRESET --- src/index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/index.js b/src/index.js index 653749c6..3b641d7b 100644 --- a/src/index.js +++ b/src/index.js @@ -32,6 +32,10 @@ var ldap_client = ldap.createClient({ reconnect: true }); +ldap_client.on('error', function(err) { + console.error('LDAP Error:', err.message) +}) + var deps = {}; deps.u2f = u2f; deps.nedb = nedb;