aboutsummaryrefslogtreecommitdiff
path: root/migration/multifd.c
diff options
context:
space:
mode:
authorDr. David Alan Gilbert <dgilbert@redhat.com>2021-04-21 12:28:33 +0100
committerDr. David Alan Gilbert <dgilbert@redhat.com>2021-06-08 19:36:19 +0100
commita59136f3b126cfbcaa13a44fbdaf8df6e3d1885f (patch)
treec13beef1dc33b19dae919442cf6d3cd600384611 /migration/multifd.c
parent1df6ddb43b48eacf5e1c7f63f48b507716150e6f (diff)
migration/socket: Close the listener at the end
Delay closing the listener until the cleanup hook at the end; mptcp needs the listener to stay open while the other paths come in. Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20210421112834.107651-5-dgilbert@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Diffstat (limited to 'migration/multifd.c')
-rw-r--r--migration/multifd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/migration/multifd.c b/migration/multifd.c
index 2e8f001bc0..ab41590e71 100644
--- a/migration/multifd.c
+++ b/migration/multifd.c
@@ -1166,6 +1166,11 @@ bool multifd_recv_all_channels_created(void)
return true;
}
+ if (!multifd_recv_state) {
+ /* Called before any connections created */
+ return false;
+ }
+
return thread_count == qatomic_read(&multifd_recv_state->count);
}