mirror of
https://github.com/libvirt/libvirt.git
synced 2026-08-04 10:23:02 -05:00
rpc: don't unconditionally quit after preserving state
The call to preserve state (ie running VMs) is triggered in response to the desktop session dbus terminating (session daemon), or logind sending a "PrepareForShutdown" signal. In the case of the latter, daemons should only save their state, not actually exit yet. Other things on the system may still expect the daemon to be running at this stage. Reviewed-by: Peter Krempa <pkrempa@redhat.com> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@@ -526,8 +526,10 @@ handleSessionMessageFunc(GDBusConnection *connection G_GNUC_UNUSED,
|
||||
|
||||
if (virGDBusMessageIsSignal(message,
|
||||
"org.freedesktop.DBus.Local",
|
||||
"Disconnected"))
|
||||
"Disconnected")) {
|
||||
virNetDaemonStop(dmn);
|
||||
virNetDaemonQuit(dmn);
|
||||
}
|
||||
|
||||
return message;
|
||||
}
|
||||
|
||||
@@ -840,7 +840,6 @@ virNetDaemonStopWorker(void *opaque)
|
||||
|
||||
VIR_DEBUG("Completed stop dmn=%p", dmn);
|
||||
|
||||
virNetDaemonQuit(dmn);
|
||||
virObjectUnref(dmn);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user