diff --git a/app/sql_channel.js b/app/sql_channel.js index ba5d85343..918b4f3f7 100644 --- a/app/sql_channel.js +++ b/app/sql_channel.js @@ -73,12 +73,14 @@ function initialize() { makeNewMultipleQueue(); multipleQueue.pause(); + const multipleQueueRef = multipleQueue; const singleQueueRef = singleQueue; + singleQueue = null; - const promise = multipleQueue.add(() => fn(...args)); + const promise = multipleQueueRef.add(() => fn(...args)); await singleQueueRef.onIdle(); - multipleQueue.start(); + multipleQueueRef.start(); result = await promise; } else { makeNewMultipleQueue();