mirror of
https://github.com/Foundry376/Mailspring.git
synced 2025-01-04 07:10:06 +08:00
fix(sync): Handle "Invalid cursor" scenario by 💣🔥 away the cache
This commit is contained in:
parent
2855c3695f
commit
63343adeac
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,5 @@
|
|||
{Emitter} = require 'event-kit'
|
||||
{DatabaseStore} = require 'nylas-exports'
|
||||
url = require 'url'
|
||||
_ = require 'underscore'
|
||||
|
||||
|
@ -109,10 +110,9 @@ class NylasLongConnection
|
|||
if res.statusCode isnt 200
|
||||
res.on 'data', (chunk) =>
|
||||
if chunk.toString().indexOf('Invalid cursor') > 0
|
||||
console.log('Delta Connection: Cursor is invalid. Need to blow away local cache.')
|
||||
# TODO THIS!
|
||||
else
|
||||
@close()
|
||||
error = new Error('Delta Connection: Cursor is invalid. Need to blow away local cache.')
|
||||
DatabaseStore._handleSetupError(error)
|
||||
@close()
|
||||
return
|
||||
|
||||
@_buffer = ''
|
||||
|
|
Loading…
Reference in a new issue