Mailspring/internal_packages/worker-sync/lib
Juan Tejada 3dccb374b3 fix(search/long-conn): Process results buffer before ending connection (#750)
NylasLongConnection ends the connection when the 'end' event is emitted
by the `request` object. When this happens, the global connection buffer is cleared.
Also, the global buffer holds the data we've received from the connection, and
whenever we receive new data, we accumulate it in the buffer and call a processBuffer function
which is throttled to 400ms.

Given that the buffer is global state, and processing occurs
asynchronously with a delay of up to 400ms, if the 'end' event on the connection is
fired before we actually get to process the buffer, we would clear it and show no results.

This scenario currently only affected search because if we accidentally
threw away some data when streaming deltas, we will get that data again
when we reopen the delta streaming connection.
2016-09-22 12:08:59 -07:00
..
contact-rankings-cache.coffee refactor(env): new NylasEnv global 2015-11-17 16:41:20 -08:00
delta-streaming-connection.es6 fix(search/long-conn): Process results buffer before ending connection (#750) 2016-09-22 12:08:59 -07:00
main.coffee feat(mail-rules): Per-account mail rules filter incoming, existing mail 2015-12-23 02:19:32 -05:00
nylas-sync-worker-pool.coffee fix(deltas): Consolidate nylas-long-connection code 2016-07-27 02:56:55 -07:00
nylas-sync-worker.coffee fix(log): Rm unecessary console.log call 2016-07-28 10:31:48 -07:00
refreshing-json-cache.coffee feat(transactions): Explicit (and faster) database transactions 2015-12-17 11:46:05 -08:00