qemu: remove the last sleep call

Finally, no more hacky sleep calls are left. Woohoo. This was already
effectively done by the previous commit, but now that I know it works,
I've removed the test path entirely
This commit is contained in:
modeco80
2024-07-16 06:43:20 -04:00
parent 6a4c1e6ac2
commit b9b0aa91df

View File

@@ -23,10 +23,6 @@ export type QemuVmDefinition = {
/// Temporary path base (for UNIX sockets/etc.) /// Temporary path base (for UNIX sockets/etc.)
const kVmTmpPathBase = `/tmp`; const kVmTmpPathBase = `/tmp`;
// Test so I can test removing any (or well, the lone) sleep calls,
// in the qemuvm code.
const kTestDisableSleep = true;
// writer implementation for process standard I/O // writer implementation for process standard I/O
class StdioWriter implements IQmpClientWriter { class StdioWriter implements IQmpClientWriter {
stdout; stdout;
@@ -236,9 +232,6 @@ export class QemuVM extends EventEmitter {
if (self.state != VMState.Stopping) { if (self.state != VMState.Stopping) {
if (code == 0) { if (code == 0) {
if(!kTestDisableSleep)
await Shared.Sleep(500);
await self.StartQemu(split); await self.StartQemu(split);
} else { } else {
self.VMLog().Error('QEMU exited with a non-zero exit code. This usually means an error in the command line. Stopping VM.'); self.VMLog().Error('QEMU exited with a non-zero exit code. This usually means an error in the command line. Stopping VM.');