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)
Closes #2687 (closed)