mirror of
https://github.com/gchq/CyberChef.git
synced 2024-11-16 08:58:30 +01:00
Fix incorrect value being sent to dishworker
This commit is contained in:
parent
5731f5c75c
commit
370cae3c8d
1 changed files with 2 additions and 2 deletions
|
@ -65,6 +65,7 @@ class WorkerWaiter {
|
||||||
setupDishWorker() {
|
setupDishWorker() {
|
||||||
if (this.dishWorker.worker !== null) {
|
if (this.dishWorker.worker !== null) {
|
||||||
this.dishWorker.worker.terminate();
|
this.dishWorker.worker.terminate();
|
||||||
|
this.dishWorker.currentAction = "";
|
||||||
}
|
}
|
||||||
log.debug("Adding new DishWorker");
|
log.debug("Adding new DishWorker");
|
||||||
|
|
||||||
|
@ -72,7 +73,7 @@ class WorkerWaiter {
|
||||||
this.dishWorker.worker.addEventListener("message", this.handleDishMessage.bind(this));
|
this.dishWorker.worker.addEventListener("message", this.handleDishMessage.bind(this));
|
||||||
|
|
||||||
if (this.dishWorkerQueue.length > 0) {
|
if (this.dishWorkerQueue.length > 0) {
|
||||||
this.postDishMessage(this.dishWorkerQueue.splice(0, 1));
|
this.postDishMessage(this.dishWorkerQueue.splice(0, 1)[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -646,7 +647,6 @@ class WorkerWaiter {
|
||||||
this.callbacks[id] = callback;
|
this.callbacks[id] = callback;
|
||||||
|
|
||||||
if (this.dishWorker.worker === null) this.setupDishWorker();
|
if (this.dishWorker.worker === null) this.setupDishWorker();
|
||||||
|
|
||||||
this.postDishMessage({
|
this.postDishMessage({
|
||||||
action: "getDishAs",
|
action: "getDishAs",
|
||||||
data: {
|
data: {
|
||||||
|
|
Loading…
Reference in a new issue