[local-sync] Correctly interrup! (don't wait for interruption)

This commit is contained in:
Juan Tejada 2017-01-16 17:33:08 -08:00
parent 87c5dd49b2
commit 3cbd7e0e88

View file

@ -432,7 +432,7 @@ class SyncWorker {
async interrupt({reason = 'No reason'} = {}) { async interrupt({reason = 'No reason'} = {}) {
console.log(`🔃 Interrupting sync! Reason: ${reason}`) console.log(`🔃 Interrupting sync! Reason: ${reason}`)
const interruptPromises = [await this._interruptible.interrupt()] const interruptPromises = [this._interruptible.interrupt()]
if (this._currentTask) { if (this._currentTask) {
interruptPromises.push(this._currentTask.interrupt()) interruptPromises.push(this._currentTask.interrupt())
} }