aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--migration/rdma.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/migration/rdma.c b/migration/rdma.c
index 78e6b72bac..0fcf02f48e 100644
--- a/migration/rdma.c
+++ b/migration/rdma.c
@@ -3253,10 +3253,14 @@ static void rdma_cm_poll_handler(void *opaque)
if (cm_event->event == RDMA_CM_EVENT_DISCONNECTED ||
cm_event->event == RDMA_CM_EVENT_DEVICE_REMOVAL) {
- error_report("receive cm event, cm event is %d", cm_event->event);
- rdma->error_state = -EPIPE;
- if (rdma->return_path) {
- rdma->return_path->error_state = -EPIPE;
+ if (!rdma->error_state &&
+ migration_incoming_get_current()->state !=
+ MIGRATION_STATUS_COMPLETED) {
+ error_report("receive cm event, cm event is %d", cm_event->event);
+ rdma->error_state = -EPIPE;
+ if (rdma->return_path) {
+ rdma->return_path->error_state = -EPIPE;
+ }
}
if (mis->migration_incoming_co) {