- GNUNET_assert (GNUNET_SCHEDULER_NO_TASK != th->notify_delay_task);
- GNUNET_SCHEDULER_cancel (h->sched,
- th->notify_delay_task);
+ if (th->notify_delay_task != GNUNET_SCHEDULER_NO_TASK)
+ {
+ GNUNET_SCHEDULER_cancel (h->sched,
+ th->notify_delay_task);
+ th->notify_delay_task = GNUNET_SCHEDULER_NO_TASK;
+ }