emailjs / emailjs-imap-client

Low-level JS IMAP client for all your IMAP needs.
MIT License
552 stars 123 forks source link

Socket closing is not an error #264

Closed ltgorm closed 11 months ago

ltgorm commented 11 months ago

The amount of error logs that come with e.g. hibernating the machine and then reviving it again is causing immunity to error logs. I claim that socket being closed automatically is not an error but a normal use case. The mail client must handle any pending imap server requests that did not resolve. So now instead of throwing an error the imap client calls its own close function that does the tearDown and handles callbacks for pending commands.