gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gnunet] branch master updated: improve logging if we shutdown because o


From: gnunet
Subject: [gnunet] branch master updated: improve logging if we shutdown because only remaining task has timeout of forever
Date: Mon, 01 Apr 2024 16:19:27 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 204dacbc8 improve logging if we shutdown because only remaining task 
has timeout of forever
204dacbc8 is described below

commit 204dacbc8705380362a36a0c79a722bebe3a17bb
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Apr 1 16:19:24 2024 +0200

    improve logging if we shutdown because only remaining task has timeout of 
forever
---
 src/lib/util/scheduler.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/src/lib/util/scheduler.c b/src/lib/util/scheduler.c
index 1dce928b4..faef5f69c 100644
--- a/src/lib/util/scheduler.c
+++ b/src/lib/util/scheduler.c
@@ -2447,6 +2447,18 @@ select_loop (struct GNUNET_SCHEDULER_Handle *sh,
   }
   GNUNET_NETWORK_fdset_destroy (rs);
   GNUNET_NETWORK_fdset_destroy (ws);
+
+  if ( (NULL == context->scheduled_head) &&
+       (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us ==
+        context->timeout.abs_value_us) )
+  {
+    /* Only remaining task has timeout of 'forever'.
+       We exit here more as sanity measure, as just
+       waiting forever isn't exactly useful. Still,
+       this is indicative of a bug in the client code. */
+    GNUNET_break (0);
+    return GNUNET_NO;
+  }
   return GNUNET_OK;
 }
 

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]