diff --git a/index.js b/index.js index 1a2a374..89a98fc 100755 --- a/index.js +++ b/index.js @@ -728,6 +728,12 @@ class NodeClam { ); return hasCb ? cb(err, null) : reject(err); }); + client.on('error', (err) => { + if(this.settings.debugMode) { + console.log(`${this.debugLabel}: Could not connect to the clamscan server.`, err); + } + return hasCb ? cb(err, null) : reject(err); + }); } catch (err) { return hasCb ? cb(err, false) : reject(err); }