mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-10 11:26:16 +01:00
Merge branch 'mcatanzaro/gsocketclient-improvement' into 'master'
gsocketclient: run timeout source on the task's main context See merge request GNOME/glib!1308
This commit is contained in:
commit
9761ecad75
@ -1794,7 +1794,7 @@ g_socket_client_enumerator_callback (GObject *object,
|
||||
attempt->connection = (GIOStream *)g_socket_connection_factory_create_connection (socket);
|
||||
attempt->timeout_source = g_timeout_source_new (HAPPY_EYEBALLS_CONNECTION_ATTEMPT_TIMEOUT_MS);
|
||||
g_source_set_callback (attempt->timeout_source, on_connection_attempt_timeout, attempt, NULL);
|
||||
g_source_attach (attempt->timeout_source, g_main_context_get_thread_default ());
|
||||
g_source_attach (attempt->timeout_source, g_task_get_context (data->task));
|
||||
data->connection_attempts = g_slist_append (data->connection_attempts, attempt);
|
||||
|
||||
if (g_task_get_cancellable (data->task))
|
||||
|
Loading…
Reference in New Issue
Block a user