Change shutdown behavior (again)

I hope this works
This commit is contained in:
MDMCK10
2023-02-11 20:39:32 +01:00
parent 07d0be6bd4
commit 25776c257f
2 changed files with 1 additions and 2 deletions

View File

@@ -220,7 +220,6 @@ export default class QEMUVM extends EventEmitter {
Resume() : Promise<void> { Resume() : Promise<void> {
return new Promise(async (res, rej) => { return new Promise(async (res, rej) => {
if (this.expectedExit) {res(); return;} if (this.expectedExit) {res(); return;}
await this.qmpClient.reboot();
await this.qmpClient.execute({ "execute": "cont" }); await this.qmpClient.execute({ "execute": "cont" });
res(); res();
}); });

View File

@@ -67,8 +67,8 @@ export default class QMPClient extends EventEmitter {
this.emit("qmpreturn", msg.return); this.emit("qmpreturn", msg.return);
else if(msg.event !== undefined) { else if(msg.event !== undefined) {
switch(msg.event) { switch(msg.event) {
case "POWERDOWN":
case "STOP": case "STOP":
case "RESET":
{ {
this.emit("qmpshutdown"); this.emit("qmpshutdown");
break break