From 4fd6ddfbdb8c2de62ffad1abf1c8808ea897b1f9 Mon Sep 17 00:00:00 2001 From: Bart Polot Date: Mon, 15 Jul 2013 17:44:52 +0000 Subject: - Poll whenever the queue is not empty --- src/mesh/gnunet-service-mesh.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/mesh') diff --git a/src/mesh/gnunet-service-mesh.c b/src/mesh/gnunet-service-mesh.c index bada66388..0610dcd33 100644 --- a/src/mesh/gnunet-service-mesh.c +++ b/src/mesh/gnunet-service-mesh.c @@ -3473,11 +3473,8 @@ queue_send (void *cls, size_t size, void *buf) &queue_send, peer); } - else if (NULL != peer->queue_head) + if (NULL != peer->queue_head) { - GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "* %s stalled\n", - GNUNET_i2s (&my_full_id)); if (peer->id == t->next_hop) fc = &t->next_fc; else if (peer->id == t->prev_hop) @@ -3487,8 +3484,11 @@ queue_send (void *cls, size_t size, void *buf) GNUNET_break (0); return data_size; } - if (NULL != fc && GNUNET_SCHEDULER_NO_TASK == fc->poll_task) + if (GNUNET_SCHEDULER_NO_TASK == fc->poll_task && fc->queue_n > 0) { + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "* %s starting poll timeout\n", + GNUNET_i2s (&my_full_id)); fc->t = t; fc->poll_task = GNUNET_SCHEDULER_add_delayed (fc->poll_time, &tunnel_poll, fc); -- cgit v1.2.3