mirror of
https://github.com/moparisthebest/mail
synced 2024-11-22 17:02:17 -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 reconnecting...');
|
||||
// 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
|
||||
|
@ -19,6 +19,9 @@ define(function(require) {
|
||||
// attach global error handler
|
||||
errorUtil.attachHandler($scope);
|
||||
|
||||
// app controller is initialized
|
||||
appController._initialized = true;
|
||||
|
||||
emailDao = appController._emailDao;
|
||||
outboxBo = appController._outboxBo;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user