Message ID | 20211207200604.3015-1-lizhang@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [v3,1/1] multifd: Shut down the QIO channels to avoid blocking the send threads when they are terminated | expand |
diff --git a/migration/multifd.c b/migration/multifd.c index 7c9deb1921..f9423be12d 100644 --- a/migration/multifd.c +++ b/migration/multifd.c @@ -522,6 +522,9 @@ static void multifd_send_terminate_threads(Error *err) qemu_mutex_lock(&p->mutex); p->quit = true; + if (p->c) { + qio_channel_shutdown(p->c, QIO_CHANNEL_SHUTDOWN_BOTH, NULL); + } qemu_sem_post(&p->sem); qemu_mutex_unlock(&p->mutex); }