From 852bc17cdf0a1ebb14d1f23e418b3d26c041534e Mon Sep 17 00:00:00 2001 From: David Barksdale Date: Tue, 2 Jan 2018 11:34:45 -0600 Subject: [PATCH] Fix double-scheduling of shutdown task --- src/util/resolver_api.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/util/resolver_api.c b/src/util/resolver_api.c index 11b8134d6..84f541ba0 100644 --- a/src/util/resolver_api.c +++ b/src/util/resolver_api.c @@ -414,10 +414,11 @@ process_requests () { /* nothing to do, release socket really soon if there is nothing * else happening... */ - s_task = - GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, - &shutdown_task, - NULL); + if (NULL == s_task) + s_task = + GNUNET_SCHEDULER_add_delayed (GNUNET_TIME_UNIT_MILLISECONDS, + &shutdown_task, + NULL); return; } if (GNUNET_NO != rh->was_transmitted) -- 2.25.1