提交 345a5092 编写于 作者: D Daniel P. Berrange

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
上级 de85acdf
......@@ -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;
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册