From e0f76c80ab3cf6c4818ab7bfcd199017e840dd0f Mon Sep 17 00:00:00 2001 From: Peter Retzlaff Date: Tue, 23 Oct 2018 09:10:09 +0200 Subject: [PATCH] Bugfix: Call the async-callback to clear the parseQueue of items. Not calling the callback caused a bug that meant that after a few tasks were enqueued on the parseQueue (i.e. a few change-/create-events), all incoming tasks were queued and never executed. That lead to newly added symbols not being added to the symbols list and the locations of all symbols after that being off. --- src/locate/locate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locate/locate.js b/src/locate/locate.js index f1e72388f..9d872a5bf 100644 --- a/src/locate/locate.js +++ b/src/locate/locate.js @@ -67,7 +67,7 @@ export class Locate { this.tree = {}; this.walkQueue = this._createWalkQueue(); this.walkPromise = null; - this.parseQueue = async.queue((task, callback) => task().then(() => callback), SINGLE_FILE_PARSE_CONCURRENCY); + this.parseQueue = async.queue((task, callback) => task().then(() => callback()), SINGLE_FILE_PARSE_CONCURRENCY); } listInFile(absPath) { const waitForParse = (absPath in this.tree) ? Promise.resolve() : this.parse(absPath);