From 07d0be6bd408ec3c2adb60fc77f6bc0e48396240 Mon Sep 17 00:00:00 2001 From: Elijah R <62162399+elijahr2411@users.noreply.github.com> Date: Sat, 11 Feb 2023 13:57:57 -0500 Subject: [PATCH] fix potential hang --- src/QEMUVM.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/QEMUVM.ts b/src/QEMUVM.ts index f68cf01..e23a03c 100644 --- a/src/QEMUVM.ts +++ b/src/QEMUVM.ts @@ -219,7 +219,7 @@ export default class QEMUVM extends EventEmitter { Resume() : Promise { return new Promise(async (res, rej) => { - if (this.expectedExit) return; + if (this.expectedExit) {res(); return;} await this.qmpClient.reboot(); await this.qmpClient.execute({ "execute": "cont" }); res(); @@ -250,4 +250,4 @@ export default class QEMUVM extends EventEmitter { res(); }) } -} \ No newline at end of file +}