Add error handling on ldap client to avoid crash on ECONNRESET

pull/10/head
Clement Michaud 2017-01-29 15:02:20 +01:00
parent e88d47a83b
commit 96b8ad9d6b
1 changed files with 4 additions and 0 deletions

View File

@ -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;