int
GNUNET_SPEEDUP_stop_ (void);
+
/**
* Initial task called by the scheduler for each
* program. Runs the program-specific main task.
program_main (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
{
struct CommandContext *cc = cls;
- GNUNET_SPEEDUP_start_(cc->cfg);
+ if (0 != (GNUNET_SCHEDULER_REASON_SHUTDOWN & tc->reason))
+ return;
+ GNUNET_SPEEDUP_start_(cc->cfg);
GNUNET_RESOLVER_connect (cc->cfg);
cc->task (cc->task_cls, cc->args, cc->cfgfile, cc->cfg);
}