summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Withnall <pwithnall@endlessos.org>2023-04-27 14:41:26 +0100
committerPhilip Withnall <pwithnall@endlessos.org>2023-04-27 14:41:26 +0100
commit865cbe3714dc484b279847cc4f8a86ab9221efdd (patch)
tree7b432d4edcc97dbefe525fc9ac3363d7d2924789
parent7922d3200cabd4c6ddb85e020b68698bbcc85ffd (diff)
downloadglib-865cbe3714dc484b279847cc4f8a86ab9221efdd.tar.gz
gthreadedresolver: Remove some incorrect assertions
If a timeout executes on the same main context iteration as completion or cancellation of a resolver lookup, `has_returned` will be set multiple times. That’s fine (the `GCond` will be notified multiple times, but that’s fine). It was triggering an incorrect assertion, so remove that. Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
-rw-r--r--gio/gthreadedresolver.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/gio/gthreadedresolver.c b/gio/gthreadedresolver.c
index b452d1e1b..2d94531bf 100644
--- a/gio/gthreadedresolver.c
+++ b/gio/gthreadedresolver.c
@@ -1439,7 +1439,6 @@ timeout_cb (gpointer user_data)
/* Signal completion of the task. */
g_mutex_lock (&data->lock);
- g_assert (!data->has_returned);
data->has_returned = TRUE;
g_cond_broadcast (&data->cond);
g_mutex_unlock (&data->lock);
@@ -1470,7 +1469,6 @@ cancelled_cb (GCancellable *cancellable,
/* Signal completion of the task. */
g_mutex_lock (&data->lock);
- g_assert (!data->has_returned);
data->has_returned = TRUE;
g_cond_broadcast (&data->cond);
g_mutex_unlock (&data->lock);
@@ -1605,7 +1603,6 @@ threaded_resolver_worker_cb (gpointer task_data,
/* Signal completion of a task. */
g_mutex_lock (&data->lock);
- g_assert (!data->has_returned);
data->has_returned = TRUE;
g_cond_broadcast (&data->cond);
g_mutex_unlock (&data->lock);