mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-12-25 07:05:28 +00:00
Fix stream abort upon I/O failure during migration
virStreamAbort is needed when the caller wishes to terminate the stream early, not when virStreamSend fails. * qemu/qemu_driver.c: Fix calling of virStreamAbort during tunnelled migration
This commit is contained in:
parent
de85acdf3b
commit
345a5092e5
@ -6619,6 +6619,7 @@ static int doTunnelMigrate(virDomainPtr dom,
|
||||
for (;;) {
|
||||
bytes = saferead(client_sock, buffer, sizeof(buffer));
|
||||
if (bytes < 0) {
|
||||
virStreamAbort(st);
|
||||
virReportSystemError(dconn, errno, "%s",
|
||||
_("tunnelled migration failed to read from qemu"));
|
||||
goto close_client_sock;
|
||||
@ -6630,7 +6631,6 @@ static int doTunnelMigrate(virDomainPtr dom,
|
||||
if (virStreamSend(st, buffer, bytes) < 0) {
|
||||
qemudReportError(dom->conn, dom, NULL, VIR_ERR_OPERATION_FAILED,
|
||||
_("Failed to write migration data to remote libvirtd"));
|
||||
virStreamAbort(st);
|
||||
goto close_client_sock;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user