problem is caused by client disconnecting before we can queue the reply, more logging
authorChristian Grothoff <christian@grothoff.org>
Mon, 24 Oct 2011 21:11:32 +0000 (21:11 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 24 Oct 2011 21:11:32 +0000 (21:11 +0000)
src/dht/dht_api.c
src/dht/gnunet-service-dht_clients.c

index 4c653e1055db85cc0d05b83acf2eca307f4dac6d..7674347e4f1689c82adbd4426160a25aac2f9982 100644 (file)
@@ -311,6 +311,9 @@ do_disconnect (struct GNUNET_DHT_Handle *handle)
   if (NULL != handle->th)
     GNUNET_CLIENT_notify_transmit_ready_cancel (handle->th);
   handle->th = NULL;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "Disconnecting from DHT service, will try to reconnect in %llu ms\n",
+             (unsigned long long) handle->retry_time.rel_value);
   GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO);
   handle->client = NULL;
   handle->reconnect_task =
@@ -335,6 +338,8 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle)
 
   if (handle->client == NULL)
   {
+    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+               "process_pending_messages called, but client is null, reconnecting\n");
     do_disconnect (handle);
     return;
   }
@@ -350,6 +355,8 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle)
                                            handle);
   if (NULL != handle->th)
     return;
+  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+             "notify_transmit_ready returned NULL, reconnecting\n");
   do_disconnect (handle);
 }
 
index 29096b0303f3c2da76d7c15ee1923bd279ee8582..60216bcc996cc63de97aef1418f4f808dd458bb4 100644 (file)
@@ -548,7 +548,7 @@ remove_by_unique_id (void *cls, const GNUNET_HashCode * key, void *value)
     return GNUNET_YES;
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
              "Removing client %p's record for key %s (by unique id)\n",
-             ctx->client,
+             ctx->client->client_handle,
              GNUNET_h2s (key));
   return remove_client_records (ctx->client, key, record);
 }