mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-23 14:15:28 +00:00
Close all sockets before cancelling QEMU migration
Cancelling the QEMU migration may cause QEMU to flush pending data on the migration socket. This may in turn block QEMU if nothing reads from the other end of the socket. Closing the socket before cancelling QEMU migration avoids this possible deadlock. * src/qemu/qemu_migration.c: Close sockets before cancelling migration on failure
This commit is contained in:
parent
74f332468d
commit
2bf92bb829
@ -1494,6 +1494,8 @@ static int doTunnelMigrate(struct qemud_driver *driver,
|
||||
|
||||
cancel:
|
||||
if (ret != 0 && virDomainObjIsActive(vm)) {
|
||||
VIR_FORCE_CLOSE(client_sock);
|
||||
VIR_FORCE_CLOSE(qemu_sock);
|
||||
qemuDomainObjEnterMonitorWithDriver(driver, vm);
|
||||
qemuMonitorMigrateCancel(priv->mon);
|
||||
qemuDomainObjExitMonitorWithDriver(driver, vm);
|
||||
|
Loading…
Reference in New Issue
Block a user