From 240b8bbc2dbb182a2c71747bd3d3f5361d0563c4 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 23 Mar 2023 17:39:54 +0000 Subject: [PATCH] gsocketclient: Clarify some internal comments Signed-off-by: Philip Withnall --- gio/gsocketclient.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gio/gsocketclient.c b/gio/gsocketclient.c index 7546e8293..3f5870475 100644 --- a/gio/gsocketclient.c +++ b/gio/gsocketclient.c @@ -1799,6 +1799,8 @@ task_completed_or_cancelled (GSocketClientAsyncConnectData *data) return FALSE; } +/* Returns %TRUE if it’s popped a connection of data->successful_connections and + * successfully started the next ongoing async operation for that connection. */ static gboolean try_next_successful_connection (GSocketClientAsyncConnectData *data) { @@ -1884,13 +1886,15 @@ try_next_connection_or_finish (GSocketClientAsyncConnectData *data, if (data->connection_in_progress) return; - /* Keep trying successful connections until one works, each iteration pops one */ + /* Try to pop and make progress on the next successful_connection. */ while (data->successful_connections) { if (try_next_successful_connection (data)) return; } + /* If there are no more successful_connections which we can make progress on, + * try the next address enumeration. */ if (!data->enumeration_completed) { enumerator_next_async (data, FALSE);