From 34433478ba9ea7073ef7475a3816c7ceb7e7b04c Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Mon, 24 Oct 2011 21:11:32 +0000 Subject: problem is caused by client disconnecting before we can queue the reply, more logging --- src/dht/dht_api.c | 7 +++++++ src/dht/gnunet-service-dht_clients.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/dht/dht_api.c b/src/dht/dht_api.c index 4c653e105..7674347e4 100644 --- a/src/dht/dht_api.c +++ b/src/dht/dht_api.c @@ -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); } diff --git a/src/dht/gnunet-service-dht_clients.c b/src/dht/gnunet-service-dht_clients.c index 29096b030..60216bcc9 100644 --- a/src/dht/gnunet-service-dht_clients.c +++ b/src/dht/gnunet-service-dht_clients.c @@ -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); } -- cgit v1.2.3