1
0
mirror of https://github.com/moparisthebest/mail synced 2024-11-23 01:12:19 -05:00

[WO-223] handle imap errors and timeouts specific before and after login screen to avoid jumping bug

This commit is contained in:
Tankred Hase 2014-02-05 15:47:27 +01:00
parent 5f93b8249f
commit 9da2a8f991
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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;