From 865cbe3714dc484b279847cc4f8a86ab9221efdd Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Thu, 27 Apr 2023 14:41:26 +0100 Subject: [PATCH] gthreadedresolver: Remove some incorrect assertions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gio/gthreadedresolver.c | 3 --- 1 file changed, 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);