mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 19:02:20 -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:
commit
f7dde61876
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user