aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migration.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/migration.c b/migration.c
index 7fd6c23fa5..71b8aade8b 100644
--- a/migration.c
+++ b/migration.c
@@ -133,9 +133,9 @@ int do_migrate_cancel(Monitor *mon, const QDict *qdict, QObject **ret_data)
{
MigrationState *s = current_migration;
- if (s)
+ if (s && s->get_status(s) == MIG_STATE_ACTIVE) {
s->cancel(s);
-
+ }
return 0;
}