mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
migration: Create migration_has_all_channels
This function allows us to decide when to close the listener socket. For now, we only need one connection. Signed-off-by: Juan Quintela <quintela@redhat.com> Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
This commit is contained in:
@@ -152,9 +152,13 @@ static gboolean socket_accept_incoming_migration(QIOChannel *ioc,
|
||||
object_unref(OBJECT(sioc));
|
||||
|
||||
out:
|
||||
/* Close listening socket as its no longer needed */
|
||||
qio_channel_close(ioc, NULL);
|
||||
return G_SOURCE_REMOVE;
|
||||
if (migration_has_all_channels()) {
|
||||
/* Close listening socket as its no longer needed */
|
||||
qio_channel_close(ioc, NULL);
|
||||
return G_SOURCE_REMOVE;
|
||||
} else {
|
||||
return G_SOURCE_CONTINUE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user