This commit is contained in:
Elijah 2023-12-10 14:51:48 -05:00
parent 136b2bed4b
commit 064cf15a35

View file

@ -91,11 +91,12 @@ export default class VM {
return;
}
var msg = msgpack.decode(payload) as protocol.ProtocolMessage;
if (this.#nopTimeout) clearInterval(this.#nopTimeout);
this.#nopTimeout = setInterval(() => this.#nopTimeoutFunc(), 5000);
if (!this.isConnectedToVM) {
if (this.#fileQueue.size > 0) this.fileQueueLoop();
this.isConnectedToVM = true;
this.#noNop = false;
this.#nopTimeout = setInterval(() => this.#nopTimeoutFunc(), 5000);
}
switch (msg.Operation) {
case protocol.ProtocolOperation.ACK:
@ -114,6 +115,7 @@ export default class VM {
this.#noNop = true;
} else {
this.isConnectedToVM = false;
clearInterval(this.#nopTimeout!);
}
}
}