Skip to content

Backport !2808 “gsocketclient: Fix passing NULL to g_task_get_cancellable()” to glib-2-72

Fix a regression from commit abddb42d, where it could pass NULL to g_task_get_cancellable(), triggering a critical warning. This could happen because the lifetime of data->task is not as long as the lifetime of the ConnectionAttempt, but the code assumed it was.

Fix the problem by keeping a strong ref to that GCancellable around until the ConnectionAttempt is finished being destroyed.

Signed-off-by: Philip Withnall pwithnall@endlessos.org

Fixes: #2687 (closed)


Trivial backport of !2808 (merged) to glib-2-72.

Merge request reports