aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migration-tcp.c1
-rw-r--r--migration-unix.c1
-rw-r--r--migration.c1
3 files changed, 1 insertions, 2 deletions
diff --git a/migration-tcp.c b/migration-tcp.c
index 78337a3e29..e8bc76acc6 100644
--- a/migration-tcp.c
+++ b/migration-tcp.c
@@ -79,7 +79,6 @@ int tcp_start_outgoing_migration(MigrationState *s, const char *host_port,
s->fd = inet_nonblocking_connect(host_port, tcp_wait_for_connect, s, &local_err);
if (local_err != NULL) {
- migrate_fd_error(s);
error_propagate(errp, local_err);
return -1;
}
diff --git a/migration-unix.c b/migration-unix.c
index 169de88677..d349662498 100644
--- a/migration-unix.c
+++ b/migration-unix.c
@@ -111,7 +111,6 @@ int unix_start_outgoing_migration(MigrationState *s, const char *path)
if (ret < 0) {
DPRINTF("connect failed\n");
- migrate_fd_error(s);
return ret;
}
migrate_fd_connect(s);
diff --git a/migration.c b/migration.c
index b332dae3a4..efea21983a 100644
--- a/migration.c
+++ b/migration.c
@@ -524,6 +524,7 @@ void qmp_migrate(const char *uri, bool has_blk, bool blk,
}
if (ret < 0 || local_err) {
+ migrate_fd_error(s);
if (!local_err) {
error_set_errno(errp, -ret, QERR_UNDEFINED_ERROR);
} else {