call GNUNET_SERVER_receive_done() also on internal error paths
[oweals/gnunet.git] / src / transport / gnunet-service-transport_hello.c
index 7ed5c1e04ba3613608be9864c07f871926d68fb5..00df3d00cbbbb16aa48b0e9795636d1b5704ecfb 100644 (file)
@@ -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);
+  }
 }