mirror of
https://github.com/libvirt/libvirt.git
synced 2026-10-02 12:20:06 -05:00
bhyve: clean up event thread
Currently, eventThread cleanup is missing. Fix that by calling virBhyveDomainObjStopWorker() in virBhyveProcessStop() and un-referring the eventThread in bhyveDomainObjPrivateFree(). Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
1 parent
fefe5fa8f0
commit
0041788857
2 files changed
+7
No files matched your search
@@ -54,6 +54,11 @@ bhyveDomainObjPrivateFree(void *data)
|
||||
|
||||
virDomainPCIAddressSetFree(priv->pciaddrs);
|
||||
|
||||
if (priv->eventThread) {
|
||||
VIR_ERROR(_("Unexpected event thread still active during domain deletion"));
|
||||
g_object_unref(priv->eventThread);
|
||||
}
|
||||
|
||||
g_free(priv);
|
||||
}
|
||||
|
||||
|
||||
@@ -675,6 +675,8 @@ virBhyveProcessStop(struct _bhyveConn *driver,
|
||||
if ((priv != NULL) && (priv->mon != NULL))
|
||||
g_clear_pointer(&priv->mon, bhyveMonitorClose);
|
||||
|
||||
virBhyveDomainObjStopWorker(vm);
|
||||
|
||||
cmd = virBhyveProcessBuildDestroyCmd(driver, vm->def);
|
||||
if (virCommandRun(cmd, NULL) < 0) {
|
||||
/* Only failure of the actual destroy command warrants unsuccessful return code,
|
||||
|
||||
Reference in new issue
Block a user