Closed ltgorm closed 11 months ago
Erroring on socket close gives an opportunity to reconnect to start idling again. Especialy when the reason isn't network down and there is no outside online/offline event to trigger reconnect.
That is a good point. It is the teardown in the close method that I was after. Because otherwise we have a looming socketTimeoutTimer when the system wakes up again. I have commited a change where we do both: close and report error. Additionally, to reduce the noise in the logs, is to not log if the client has been supplied with an onerror function from its user.
looks good, squashed and pushed as 0309d294f599efa7c5f4e47564f39046ab09623a
Socket will close when network goes down e.g. when machine is being suspended/hibernated. This should not be treated as an error. Rather, the imap-client should wrap up and close also.