gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: fix crash if resumed task immedi


From: gnunet
Subject: [taler-merchant] branch master updated: fix crash if resumed task immediately suspends again
Date: Sun, 11 Apr 2021 01:35:13 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new a9efaf54 fix crash if resumed task immediately suspends again
a9efaf54 is described below

commit a9efaf54b146a1b816b83229363173ed518e6ce1
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Apr 11 01:35:10 2021 +0200

    fix crash if resumed task immediately suspends again
---
 src/backend/taler-merchant-httpd.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 041162b4..58278856 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -420,6 +420,8 @@ do_resume (void *cls)
     MHD_resume_connection (sc->con);
     TMH_trigger_daemon ();   /* we resumed, kick MHD */
   }
+  if (NULL != resume_timeout_task)
+    GNUNET_SCHEDULER_cancel (resume_timeout_task);
   resume_timeout_task = GNUNET_SCHEDULER_add_at (sc->long_poll_timeout,
                                                  &do_resume,
                                                  NULL);
@@ -715,11 +717,6 @@ do_shutdown (void *cls)
     GNUNET_CONTAINER_heap_destroy (resume_timeout_heap);
     resume_timeout_heap = NULL;
   }
-  if (NULL != resume_timeout_task)
-  {
-    GNUNET_SCHEDULER_cancel (resume_timeout_task);
-    resume_timeout_task = NULL;
-  }
   if (NULL != mhd)
   {
     MHD_stop_daemon (mhd);
@@ -733,6 +730,11 @@ do_shutdown (void *cls)
   }
   TMH_EXCHANGES_done ();
   TMH_AUDITORS_done ();
+  if (NULL != resume_timeout_task)
+  {
+    GNUNET_SCHEDULER_cancel (resume_timeout_task);
+    resume_timeout_task = NULL;
+  }
   if (NULL != payment_trigger_map)
   {
     GNUNET_CONTAINER_multihashmap_iterate (payment_trigger_map,

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