- fixes
authorSree Harsha Totakura <totakura@in.tum.de>
Mon, 28 Oct 2013 15:55:43 +0000 (15:55 +0000)
committerSree Harsha Totakura <totakura@in.tum.de>
Mon, 28 Oct 2013 15:55:43 +0000 (15:55 +0000)
src/testbed/gnunet-service-testbed_connectionpool.c

index ae80c1fd95c519c93c296b1ffaa6aae1682dcc10..a61b55c91804c8c0b800b603f79d3681b11fa64f 100644 (file)
@@ -885,7 +885,15 @@ GST_connection_pool_get_handle_done (struct GST_ConnectionPool_GetHandle *gh)
              gh,
              gh->service, entry->index);
   if (!gh->connection_ready_called)
+  {
     GNUNET_CONTAINER_DLL_remove (entry->head_waiting, entry->tail_waiting, gh);
+    if ((NULL == entry->head_waiting)
+        && (GNUNET_SCHEDULER_NO_TASK != entry->notify_task))
+    {
+      GNUNET_SCHEDULER_cancel (entry->notify_task);
+      entry->notify_task = GNUNET_SCHEDULER_NO_TASK;
+    }
+  }
   if (gh->notify_waiting)
   { 
     GNUNET_CONTAINER_DLL_remove (entry->head_notify, entry->tail_notify, gh);