random hack - 1618
authorChristian Grothoff <christian@grothoff.org>
Wed, 24 Nov 2010 16:34:32 +0000 (16:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 24 Nov 2010 16:34:32 +0000 (16:34 +0000)
src/core/gnunet-service-core.c

index a13f3a2134c0117bb9ad273fa4af0150e2729a65..f28f2001e01eab354bda6114b85616010af1a22d 100644 (file)
@@ -2757,7 +2757,7 @@ notify_transport_connect_done (void *cls, size_t size, void *buf)
       /* transport should only call us to transmit a message after
        * telling us about a successful connection to the respective peer */
 #if DEBUG_CORE
-      GNUNET_log(GNUNET_ERROR_TYPE_DEBUG, "Timeout on notify connect!\n");
+      GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Timeout on notify connect!\n");
 #endif
       return 0;
     }
@@ -4195,6 +4195,11 @@ handle_transport_notify_disconnect (void *cls,
       cnm.peer = *peer;
       send_to_all_clients (&cnm.header, GNUNET_NO, GNUNET_CORE_OPTION_SEND_DISCONNECT);
     }
+  if (NULL != n->th)
+    {
+      GNUNET_TRANSPORT_notify_transmit_ready_cancel (n->th);
+      n->th = NULL;
+    }
   n->is_connected = GNUNET_NO;
   n->status = PEER_STATE_DOWN;
   while (NULL != (car = n->active_client_request_head))