- don't shutdown twice
authorBart Polot <bart@net.in.tum.de>
Mon, 17 Mar 2014 11:02:37 +0000 (11:02 +0000)
committerBart Polot <bart@net.in.tum.de>
Mon, 17 Mar 2014 11:02:37 +0000 (11:02 +0000)
src/mesh/gnunet-mesh-profiler.c

index 480ecea394fed9ed43a41b55846ff101bb304da4..88d3ab9e51c9f9039e323b7fca3459559245b0ec 100644 (file)
@@ -248,6 +248,10 @@ disconnect_mesh_peers (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc)
   for (i = 0; i < TOTAL_PEERS; i++)
   {
     GNUNET_TESTBED_operation_done (peers[i].op);
+
+    if (peers[i].up != GNUNET_YES)
+      continue;
+
     GNUNET_MESH_channel_destroy (peers[i].ch);
     if (NULL != peers[i].incoming_ch)
       GNUNET_MESH_channel_destroy (peers[i].incoming_ch);