Minor edits.

This commit is contained in:
Michael Lipp 2025-03-13 15:46:11 +01:00
parent d637cb2c72
commit 2a3774ae24

View file

@ -196,6 +196,7 @@ public class QemuMonitor extends QemuConnector {
+ " cannot send powerdown command"); + " cannot send powerdown command");
return; return;
} }
// We have a connection to Qemu, attempt ACPI shutdown. // We have a connection to Qemu, attempt ACPI shutdown.
event.suspendHandling(); event.suspendHandling();
suspendedStop = event; suspendedStop = event;
@ -203,7 +204,6 @@ public class QemuMonitor extends QemuConnector {
// Attempt powerdown command. If not confirmed, assume // Attempt powerdown command. If not confirmed, assume
// "hanging" qemu process. // "hanging" qemu process.
powerdownTimer = Components.schedule(t -> { powerdownTimer = Components.schedule(t -> {
// Powerdown not confirmed
logger.fine(() -> "QMP powerdown command not confirmed"); logger.fine(() -> "QMP powerdown command not confirmed");
synchronized (this) { synchronized (this) {
powerdownTimer = null; powerdownTimer = null;
@ -212,7 +212,7 @@ public class QemuMonitor extends QemuConnector {
suspendedStop = null; suspendedStop = null;
} }
} }
}, Duration.ofSeconds(1)); }, Duration.ofSeconds(5));
logger.fine(() -> "Attempting QMP powerdown."); logger.fine(() -> "Attempting QMP powerdown.");
powerdownStartedAt = Instant.now(); powerdownStartedAt = Instant.now();
fire(new MonitorCommand(new QmpPowerdown())); fire(new MonitorCommand(new QmpPowerdown()));