Previous commit didn't work, let's try it again.

This commit is contained in:
MDMCK10
2023-02-11 20:52:25 +01:00
parent 25776c257f
commit 5f603a88d9
2 changed files with 15 additions and 14 deletions

View File

@@ -55,10 +55,6 @@ export default class QEMUVM extends EventEmitter {
this.processRestartErrorLevel = 0;
this.expectedExit = false;
this.qmpClient = new QMPClient(this.qmpSock, this.qmpType);
this.qmpClient.on('qmpshutdown', () => {
console.log("[INFO] QEMU requested shutdown, restarting...");
this.Resume();
});
this.qmpClient.on('connected', () => this.qmpConnected());
this.qmpClient.on('close', () => this.qmpClosed());
}
@@ -217,14 +213,6 @@ export default class QEMUVM extends EventEmitter {
this.Start();
}
Resume() : Promise<void> {
return new Promise(async (res, rej) => {
if (this.expectedExit) {res(); return;}
await this.qmpClient.execute({ "execute": "cont" });
res();
});
}
Stop() : Promise<void> {
return new Promise<void>(async (res, rej) => {
if (this.expectedExit) {res(); return;}