kill pending transmit tasks on destroy
authorChristian Grothoff <christian@grothoff.org>
Sat, 31 Oct 2009 21:19:16 +0000 (21:19 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 31 Oct 2009 21:19:16 +0000 (21:19 +0000)
src/transport/transport_api.c

index f92b94ca12ae2a1fffce5dc03590a1c6ffbbfc19..122950a74e14f1ebb000697602dd05d2791538e7 100644 (file)
@@ -1535,6 +1535,11 @@ GNUNET_TRANSPORT_disconnect (struct GNUNET_TRANSPORT_Handle *handle)
   GNUNET_free_non_null (handle->my_hello);
   handle->my_hello = NULL;
   GNUNET_ARM_stop_services (handle->cfg, handle->sched, "transport", "peerinfo", NULL);
+  if (NULL != handle->network_handle)
+    {
+      GNUNET_CLIENT_notify_transmit_ready_cancel (handle->network_handle);
+      handle->network_handle = NULL;
+    }
   if (NULL != (client = handle->client))
     {
 #if DEBUG_TRANSPORT