1
0
mirror of https://github.com/moparisthebest/mail synced 2024-12-25 16:58:58 -05:00

[WO-221] do silent imap reconnect without invoking callback to login view

This commit is contained in:
Tankred Hase 2014-01-27 21:27:00 +01:00
parent 5748ee36c0
commit be3728942c

View File

@ -116,9 +116,17 @@ define(function(require) {
smtpClient = new SmtpClient(smtpOptions); smtpClient = new SmtpClient(smtpOptions);
imapClient.onError = function(err) { 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 // 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 // connect to clients