adding more error handling

This commit is contained in:
John Shaver 2018-05-04 10:13:22 -07:00
parent c2c7ed40d5
commit a254958bf6
1 changed files with 1 additions and 0 deletions

View File

@ -57,6 +57,7 @@ module.exports.create = function (deps, config, tcpMods) {
socket.on('error', function (err) {
console.log('wrapped TLS socket error', err);
if(reader.listenerCount("error")){
console.log("There are error handlers that should handle this emiting error.");
reader.emit('error', err);
} else {
console.log('Wrapped TLS socket had no error handlers for error. Socket object: ', reader);