Message ID | 20170713115649.11853-6-dgilbert@redhat.com |
---|---|
State | New |
Headers | show |
diff --git a/migration/rdma.c b/migration/rdma.c index 89684fdec6..bb9aa48d8c 100644 --- a/migration/rdma.c +++ b/migration/rdma.c @@ -2258,7 +2258,9 @@ static void qemu_rdma_cleanup(RDMAContext *rdma) int ret, idx; if (rdma->cm_id && rdma->connected) { - if (rdma->error_state && !rdma->received_error) { + if ((rdma->error_state || + migrate_get_current()->state == MIGRATION_STATUS_CANCELLING) && + !rdma->received_error) { RDMAControlHeader head = { .len = 0, .type = RDMA_CONTROL_ERROR, .repeat = 1,