Previous commit didn't work, let's try it again.
This commit is contained in:
@@ -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;}
|
||||
|
||||
Reference in New Issue
Block a user