-enable helper shutdown during mst callback
authorChristian Grothoff <christian@grothoff.org>
Sun, 29 Jan 2012 21:24:56 +0000 (21:24 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sun, 29 Jan 2012 21:24:56 +0000 (21:24 +0000)
src/util/helper.c

index 029203638563103ce9e4321e884931c63f02fe3e..b03990fbe09008c535df767ceb5c7d9f3837d27b 100644 (file)
@@ -264,6 +264,8 @@ helper_read (void *cls,
              _("Got %u bytes from helper `%s'\n"),
              (unsigned int) t,
              h->binary_name);
+  h->read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
+                                                h->fh_from_helper, &helper_read, h);
   if (GNUNET_SYSERR ==
       GNUNET_SERVER_mst_receive (h->mst, NULL, buf, t, GNUNET_NO, GNUNET_NO))
   {
@@ -278,8 +280,6 @@ helper_read (void *cls,
     return;
 
   }
-  h->read_task = GNUNET_SCHEDULER_add_read_file (GNUNET_TIME_UNIT_FOREVER_REL,
-                                                h->fh_from_helper, &helper_read, h);
 }