mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-11 01:54:40 +08:00
[client-sync] Fix mail listener imap connection
Summary: Given that we keep the imap mail listener conenction open outside of the imap connection pool, it might close itself after a while or after putting your computer to sleep. Previously, if we had the connection object we just assumed it was connected and proceeded with sync, and if it wasn't, we would fall into an error loop in the sync worker preventing it from syncing at all (T8065) To fix this, we just call `connect` every time to ensure the connection is open. (This was the case before we introduced the connection pool) Test Plan: manual Reviewers: mark, spang, halla, evan Reviewed By: halla, evan Differential Revision: https://phab.nylas.com/D4334
This commit is contained in:
parent
f629818075
commit
7dec807b28
1 changed files with 2 additions and 1 deletions
|
@ -252,7 +252,8 @@ class SyncWorker {
|
|||
async _ensureIMAPMailListenerConnection() {
|
||||
if (this._destroyed) { return }
|
||||
if (this._mailListenerConn) {
|
||||
return;
|
||||
await this._mailListenerConn.connect();
|
||||
return
|
||||
}
|
||||
|
||||
await IMAPConnectionPool.withConnectionsForAccount(this._account, {
|
||||
|
|
Loading…
Reference in a new issue