Skip to content
This repository was archived by the owner on Jul 10, 2019. It is now read-only.

Commit 9da2a8f

Browse files
author
Tankred Hase
committed
[WO-223] handle imap errors and timeouts specific before and after login screen to avoid jumping bug
1 parent 5f93b82 commit 9da2a8f

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

src/js/app-controller.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,19 @@ define(function(require) {
120120
console.log('IMAP error.', err);
121121
console.log('IMAP reconnecting...');
122122
// re-init client modules on error
123-
self.onConnect(callback);
123+
self.onConnect(function(err) {
124+
if (!self._initialized) {
125+
callback(err);
126+
return;
127+
}
128+
129+
if (err) {
130+
console.error('IMAP reconnect failed!', err);
131+
return;
132+
}
133+
134+
console.log('IMAP reconnect attempt complete.');
135+
});
124136
};
125137

126138
// connect to clients

src/js/controller/navigation.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ define(function(require) {
1919
// attach global error handler
2020
errorUtil.attachHandler($scope);
2121

22+
// app controller is initialized
23+
appController._initialized = true;
24+
2225
emailDao = appController._emailDao;
2326
outboxBo = appController._outboxBo;
2427

0 commit comments

Comments
 (0)