another special case for loopback
authorChristian Grothoff <christian@grothoff.org>
Mon, 23 Jan 2017 13:19:06 +0000 (14:19 +0100)
committerChristian Grothoff <christian@grothoff.org>
Mon, 23 Jan 2017 13:19:06 +0000 (14:19 +0100)
src/cadet/gnunet-service-cadet-new_channel.c

index fbd68e3e31c7c0e671b2c93e9c8be574730a336b..e7a13157bb1122208fc7167c76f1f4702115038b 100644 (file)
@@ -407,9 +407,13 @@ channel_destroy (struct CadetChannel *ch)
     GNUNET_SCHEDULER_cancel (ch->retry_control_task);
     ch->retry_control_task = NULL;
   }
-  GCT_remove_channel (ch->t,
-                      ch,
-                      ch->ctn);
+  if (GNUNET_NO == ch->is_loopback)
+  {
+    GCT_remove_channel (ch->t,
+                        ch,
+                        ch->ctn);
+    ch->t = NULL;
+  }
   GNUNET_free (ch);
 }