fixing assertion: cancel transmit ready on disconnect
authorMatthias Wachs <wachs@net.in.tum.de>
Fri, 6 Jul 2012 08:49:54 +0000 (08:49 +0000)
committerMatthias Wachs <wachs@net.in.tum.de>
Fri, 6 Jul 2012 08:49:54 +0000 (08:49 +0000)
src/transport/gnunet-transport.c

index d0a1358060cb0657c97efe7a2e9968e39ea806cf..65c574f622b2f2cc2dc14a14561284f2c734d8df 100644 (file)
@@ -417,6 +417,12 @@ notify_disconnect (void *cls, const struct GNUNET_PeerIdentity *peer)
 {
   if (verbosity > 0)
     FPRINTF (stdout, _("Disconnected from %s\n"), GNUNET_i2s (peer));
+  if (NULL != th)
+  {
+    GNUNET_TRANSPORT_notify_transmit_ready_cancel (th);
+    th = NULL;
+  }
+
 }
 
 /**