Change shutdown behavior (again)
I hope this works
This commit is contained in:
@@ -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();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user