mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-03-04 12:05:04 +08:00
[local-sync] fix changedsince highestmodseq causing N1 crash
Since we weren't giving Node IMAP the proper format for the changedsince flag, and since node IMAP never warned of improper schemas, we weren't properly requesting the correct range. This would cause us to request the metadata attributes of EVERY message in the mailbox and attempt to store them in a hash. This would eventually lead to a memory leak and take down the worker window, which caused other subtle issues like sends failing when the worker window dropped task half way through their perform remotes and never re-sent the deltas notifying of their success or failure. This was only triggered when new highestmodseq numbers fired on the remote server, which would be triggered by the underlying mailbox getting folders or labels changed on messages
This commit is contained in:
parent
7073e19fe7
commit
73db7a4e46
1 changed files with 2 additions and 1 deletions
|
@ -357,7 +357,8 @@ class FetchMessagesInFolder extends SyncOperation {
|
|||
// this._logger.info('FetchMessagesInFolder: highestmodseq matches, nothing more to fetch')
|
||||
return Promise.resolve();
|
||||
}
|
||||
shallowFetch = this._box.fetchUIDAttributes(`1:*`, {changedsince: highestmodseq});
|
||||
shallowFetch = this._box.fetchUIDAttributes(`1:*`,
|
||||
{modifiers: {changedsince: highestmodseq}});
|
||||
} else {
|
||||
const range = `${this._getLowerBoundUID(SHALLOW_SCAN_UID_COUNT)}:*`;
|
||||
// this._logger.info({range}, `FetchMessagesInFolder: Shallow attribute scan`)
|
||||
|
|
Loading…
Reference in a new issue