andris9/Nodemailer — Issue #52: SMTP client keeps listening on timeout errors
Author: tomas
Created: 2011-11-30 01:13:36+00:00
State: open

Hey Andris,

First of all, nice work mate!

I was just trying out Nodemailer for sending SMTP messages (not using auth, but directly to Gmail on port 25) and found out that when a timeout error occurs, the SMTP connection is not closed so the result is that the node process keeps running forever. After a while, the client tries to resend the message but always throws a "connect Unknown system errno 110" exception.

As far as I tested, the only way to fix this was to forcefully destroy() the connection on the SMTPClient.prototype.close() method. I thought of forking and sending a pull request but I'm not sure if that's the best solution -- besides, it's just one line of code. :)

That's all mate, thanks again.