1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-23 15:58:49 -05:00

Merge pull request #12 from whiteout-io/dev/imap-error

[WO-221] do silent imap reconnect without invoking callback to login vie...
This commit is contained in:
Felix Hammerl 2014-01-28 06:11:54 -08:00
commit f7dde61876

View File

@ -116,9 +116,17 @@ define(function(require) {
smtpClient = new SmtpClient(smtpOptions);
imapClient.onError = function(err) {
console.log('IMAP error... reconnecting.', err);
console.log('IMAP error.', err);
console.log('IMAP reconnecting...');
// re-init client modules on error
self.onConnect(callback);
self.onConnect(function(err) {
if (err) {
console.error('IMAP reconnect failed!', err);
return;
}
console.log('IMAP reconnect successful.');
});
};
// connect to clients