Closed Jbone187 closed 5 years ago
@Jbone187 Have you attached a listener to error
? It seems like you're intended to add your own reconnect logic there. I believe the emitNone
in the stack trace may mean that no error handler was registered.
Either way, there needs to be a way for you to catch
that throw
to handle reconnect logic.
After looking over the error again I think this error is related to the https module I am using. Sorry for the inconveniences
@Jbone187 Thanks for following up. Do you mind closing the issue?
Go ahead and close
@Jbone187 I am experiencing the same issue. Could you kindly provide some hints about how did you solve it?
@giacomobartoli I just threw a try catch in there to catch the error so it wouldn't kill the process. It was happening due to network issue with my mail server and when it couldn't communicate it was throwing that error in my situation. Hope this help some
@Jbone187 thank you for the quick answer. I just realized that I was not handling the 'end' event within the email-listener. So now I am trying handle this event, but if it does not work I'll proceed with your suggestion.
throw er; // Unhandled 'error' event ^
Error: socket hang up at TLSSocket.onHangUp (_tls_wrap.js:1135:19) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20) at TLSSocket.emit (events.js:208:7) at endReadableNT (_stream_readable.js:1055:12) at _combinedTickCallback (internal/process/next_tick.js:138:11) at process._tickCallback (internal/process/next_tick.js:180:9)