aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2024-04-01 16:19:24 +0200
committert3serakt <t3ss@posteo.de>2024-04-10 20:14:58 +0200
commit1ea32d4d97b7cd1f75b6386505d6347586271ee4 (patch)
treef575cb555bd9f823f9a87453db2dad30baa115c0
parentf1984d0edd24851b58e102e1a9b74b8e216a86ac (diff)
downloadgnunet-1ea32d4d97b7cd1f75b6386505d6347586271ee4.tar.gz
gnunet-1ea32d4d97b7cd1f75b6386505d6347586271ee4.zip
improve logging if we shutdown because only remaining task has timeout of forever
-rw-r--r--src/lib/util/scheduler.c12
1 files changed, 12 insertions, 0 deletions
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,
2447 } 2447 }
2448 GNUNET_NETWORK_fdset_destroy (rs); 2448 GNUNET_NETWORK_fdset_destroy (rs);
2449 GNUNET_NETWORK_fdset_destroy (ws); 2449 GNUNET_NETWORK_fdset_destroy (ws);
2450
2451 if ( (NULL == context->scheduled_head) &&
2452 (GNUNET_TIME_UNIT_FOREVER_ABS.abs_value_us ==
2453 context->timeout.abs_value_us) )
2454 {
2455 /* Only remaining task has timeout of 'forever'.
2456 We exit here more as sanity measure, as just
2457 waiting forever isn't exactly useful. Still,
2458 this is indicative of a bug in the client code. */
2459 GNUNET_break (0);
2460 return GNUNET_NO;
2461 }
2450 return GNUNET_OK; 2462 return GNUNET_OK;
2451} 2463}
2452 2464