summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-02-12 19:19:11 +0000
committerChristian Grothoff <christian@grothoff.org>2015-02-12 19:19:11 +0000
commit30b63fcc6c9ab16a15f2f9640f8991e2893d9cef (patch)
tree7576181042b90e16bfdc1653fd7c67502d083b5c /src
parente5f8178881e8fa8af23574b8303f0396f79c0834 (diff)
-fix shutdown issue
Diffstat (limited to 'src')
-rw-r--r--src/transport/gnunet-service-transport_hello.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/transport/gnunet-service-transport_hello.c b/src/transport/gnunet-service-transport_hello.c
index 7ed5c1e04..00df3d00c 100644
--- a/src/transport/gnunet-service-transport_hello.c
+++ b/src/transport/gnunet-service-transport_hello.c
@@ -203,16 +203,19 @@ refresh_hello_task (void *cls,
/**
- * Schedule task to refresh hello (unless such a
- * task exists already).
+ * Schedule task to refresh hello (but only if such a
+ * task exists already, as otherwise the module might
+ * have been shutdown).
*/
static void
refresh_hello ()
{
if (NULL != hello_task)
+ {
GNUNET_SCHEDULER_cancel (hello_task);
- hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task,
- NULL);
+ hello_task = GNUNET_SCHEDULER_add_now (&refresh_hello_task,
+ NULL);
+ }
}