/**
- * Schedule the next action to be performed.
+ * Reconnect at a later time, respecting back-off.
*
- * @param cls statistics handle to reconnect
+ * @param h statistics handle
*/
static void
-schedule_action (void *cls);
+reconnect_later (struct GNUNET_STATISTICS_Handle *h);
/**
- * Reconnect at a later time, respecting back-off.
+ * Schedule the next action to be performed.
*
- * @param h statistics handle
+ * @param cls statistics handle to reconnect
*/
static void
-reconnect_later (struct GNUNET_STATISTICS_Handle *h);
+schedule_action (void *cls);
/**
2,
c->subsystem,
c->name));
+ GNUNET_MQ_notify_sent (env,
+ &schedule_action,
+ handle);
GNUNET_MQ_send (handle->mq,
env);
}
2,
handle->current->subsystem,
handle->current->name));
+ GNUNET_MQ_notify_sent (env,
+ &schedule_action,
+ handle);
GNUNET_MQ_send (handle->mq,
env);
GNUNET_assert (NULL == handle->current->cont);
reconnect_later (h);
return;
}
+ if (0 < GNUNET_MQ_get_length (h->mq) )
+ return; /* Wait for queue to be reduced more */
/* schedule next action */
while (NULL == h->current)
{
h->do_destroy = GNUNET_SYSERR; /* in 'TEST' mode */
env = GNUNET_MQ_msg (hdr,
GNUNET_MESSAGE_TYPE_TEST);
+ GNUNET_MQ_notify_sent (env,
+ &schedule_action,
+ h);
GNUNET_MQ_send (h->mq,
env);
return;