mirror of
https://github.com/moparisthebest/mail
synced 2024-11-26 19:02:20 -05:00
[WO-223] handle imap errors and timeouts specific before and after login screen to avoid jumping bug
This commit is contained in:
parent
5f93b8249f
commit
9da2a8f991
@ -120,7 +120,19 @@ define(function(require) {
|
|||||||
console.log('IMAP error.', err);
|
console.log('IMAP error.', err);
|
||||||
console.log('IMAP reconnecting...');
|
console.log('IMAP reconnecting...');
|
||||||
// re-init client modules on error
|
// re-init client modules on error
|
||||||
self.onConnect(callback);
|
self.onConnect(function(err) {
|
||||||
|
if (!self._initialized) {
|
||||||
|
callback(err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (err) {
|
||||||
|
console.error('IMAP reconnect failed!', err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log('IMAP reconnect attempt complete.');
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
// connect to clients
|
// connect to clients
|
||||||
|
@ -19,6 +19,9 @@ define(function(require) {
|
|||||||
// attach global error handler
|
// attach global error handler
|
||||||
errorUtil.attachHandler($scope);
|
errorUtil.attachHandler($scope);
|
||||||
|
|
||||||
|
// app controller is initialized
|
||||||
|
appController._initialized = true;
|
||||||
|
|
||||||
emailDao = appController._emailDao;
|
emailDao = appController._emailDao;
|
||||||
outboxBo = appController._outboxBo;
|
outboxBo = appController._outboxBo;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user