From ef3ab57bc87489dffddc25714196198a01115bba Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Fri, 24 Feb 2012 16:27:36 +0000 Subject: [PATCH] - Attemp to avoid testing hang on ctrl-c during bootstrap --- src/dht/test_dht_multipeer.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/dht/test_dht_multipeer.c b/src/dht/test_dht_multipeer.c index b8da82a2d..48946df75 100644 --- a/src/dht/test_dht_multipeer.c +++ b/src/dht/test_dht_multipeer.c @@ -224,11 +224,13 @@ shutdown_callback (void *cls, const char *emsg) if (ok == 0) ok = 2; } + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Shutdown callback completed.\n"); } static void do_stop (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) { + GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Shutdown requested.\n"); GNUNET_TESTING_daemons_stop (pg, TIMEOUT, &shutdown_callback, NULL); pg = NULL; } @@ -788,6 +790,8 @@ run (void *cls, char *const *args, const char *cfgfile, pg = GNUNET_TESTING_peergroup_start (cfg, num_peers, TIMEOUT, NULL, &startup_done, NULL, NULL); GNUNET_assert (NULL != pg); + GNUNET_SCHEDULER_add_delayed(GNUNET_TIME_UNIT_FOREVER_REL, + &do_stop, NULL); } -- 2.25.1