cancel on disconnect
authorChristian Grothoff <christian@grothoff.org>
Tue, 2 Aug 2011 11:55:37 +0000 (11:55 +0000)
committerChristian Grothoff <christian@grothoff.org>
Tue, 2 Aug 2011 11:55:37 +0000 (11:55 +0000)
src/transport/test_quota_compliance.c

index 2857a30570da54c11ceb78ce0b2e28c3e70022ac..a3b135eb224a281fa186eecb960daaaee9b41a6b 100644 (file)
@@ -632,6 +632,14 @@ notify_connect (void *cls,
 static void
 notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
+  if (cls == &p2)
+    {
+      if (NULL != transmit_handle)
+       {
+         GNUNET_TRANSPORT_notify_transmit_ready_cancel (transmit_handle);
+         transmit_handle = NULL;
+       }
+    }
   connected--;
 #if DEBUG_CONNECTIONS
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,