gnunet-svn
[Top][All Lists]
Advanced

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

[gnunet] 05/05: REVOCATION: add shutdown task earlier.


From: gnunet
Subject: [gnunet] 05/05: REVOCATION: add shutdown task earlier.
Date: Mon, 06 Feb 2023 05:41:15 +0100

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

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

commit d8cbbb5b6ba10b2c1ca5d889ecb3788f931d8566
Author: ulfvonbelow <strilen@tilde.club>
AuthorDate: Sun Jan 29 05:47:00 2023 -0600

    REVOCATION: add shutdown task earlier.
    
    There are many things that can go wrong and require cleanup before the
    shutdown task is currently added. In these cases, GNUNET_SCHEDULER_shutdown 
is
    run and run() is returned from. At present, the only harm in running
    shutdown_task earlier would be it unconditionally destroying revocation_map,
    so we can add it as soon as that exists.
    
    Signed-off-by: Martin Schanzenbach <schanzen@gnunet.org>
---
 src/revocation/gnunet-service-revocation.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/revocation/gnunet-service-revocation.c 
b/src/revocation/gnunet-service-revocation.c
index e10771557..2cee70857 100644
--- a/src/revocation/gnunet-service-revocation.c
+++ b/src/revocation/gnunet-service-revocation.c
@@ -899,6 +899,8 @@ run (void *cls,
   cfg = c;
   revocation_map = GNUNET_CONTAINER_multihashmap_create (16,
                                                          GNUNET_NO);
+  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
+                                 NULL);
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_number (cfg,
                                              "REVOCATION",
@@ -1001,8 +1003,6 @@ run (void *cls,
   }
   GNUNET_free (fn);
 
-  GNUNET_SCHEDULER_add_shutdown (&shutdown_task,
-                                 NULL);
   peers = GNUNET_CONTAINER_multipeermap_create (128,
                                                 GNUNET_YES);
   /* Connect to core service and register core handlers */

-- 
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]