Merge branch 'wip/tingping/socket-cancellation' into 'master'

gsocketclient: Ensure task is always returned on cancel

Closes libsoup#132

See merge request GNOME/glib!647
This commit is contained in:
Michael Catanzaro 2019-02-14 18:26:17 +00:00
commit eac2b1a1c3

View File

@ -1567,7 +1567,7 @@ g_socket_client_connected_callback (GObject *source,
GProxy *proxy; GProxy *proxy;
const gchar *protocol; const gchar *protocol;
if (g_cancellable_is_cancelled (attempt->cancellable) || task_completed_or_cancelled (data->task)) if (task_completed_or_cancelled (data->task) || g_cancellable_is_cancelled (attempt->cancellable))
{ {
g_object_unref (data->task); g_object_unref (data->task);
connection_attempt_unref (attempt); connection_attempt_unref (attempt);