Skip to content

Commit

Permalink
Fixed race condition while searching/rebuilding search index
Browse files Browse the repository at this point in the history
  • Loading branch information
SimplyBoo committed Oct 3, 2018
1 parent cf02db9 commit 1429605
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/database/manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ class MediaManager {
}
const outputKeys = [];
for (let i = 0; i < inputKeys.length; i++) {
let field = getField(inputKeys[i]);
const field = getField(inputKeys[i]);
if (field) {
if (parsedExpression.match(field)) {
outputKeys.push(inputKeys[i]);
Expand Down
2 changes: 1 addition & 1 deletion src/database/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class Mutex {
const $this = this;
return new Promise(function(resolve, reject) {
if ($this.locked) {
this.clients.push(resolve);
$this.clients.push(resolve);
} else {
$this.locked = true;
resolve();
Expand Down

0 comments on commit 1429605

Please sign in to comment.