diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-10-24 21:11:32 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-10-24 21:11:32 +0000 |
commit | 34433478ba9ea7073ef7475a3816c7ceb7e7b04c (patch) | |
tree | c8e1ca7d29b681604eca4baed4366c3e36e88ecc /src/dht | |
parent | 9608ed9c11c8e7c3d84fdb855ebcf57d2fb8745e (diff) | |
download | gnunet-34433478ba9ea7073ef7475a3816c7ceb7e7b04c.tar.gz gnunet-34433478ba9ea7073ef7475a3816c7ceb7e7b04c.zip |
problem is caused by client disconnecting before we can queue the reply, more logging
Diffstat (limited to 'src/dht')
-rw-r--r-- | src/dht/dht_api.c | 7 | ||||
-rw-r--r-- | src/dht/gnunet-service-dht_clients.c | 2 |
2 files changed, 8 insertions, 1 deletions
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) | |||
311 | if (NULL != handle->th) | 311 | if (NULL != handle->th) |
312 | GNUNET_CLIENT_notify_transmit_ready_cancel (handle->th); | 312 | GNUNET_CLIENT_notify_transmit_ready_cancel (handle->th); |
313 | handle->th = NULL; | 313 | handle->th = NULL; |
314 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
315 | "Disconnecting from DHT service, will try to reconnect in %llu ms\n", | ||
316 | (unsigned long long) handle->retry_time.rel_value); | ||
314 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO); | 317 | GNUNET_CLIENT_disconnect (handle->client, GNUNET_NO); |
315 | handle->client = NULL; | 318 | handle->client = NULL; |
316 | handle->reconnect_task = | 319 | handle->reconnect_task = |
@@ -335,6 +338,8 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle) | |||
335 | 338 | ||
336 | if (handle->client == NULL) | 339 | if (handle->client == NULL) |
337 | { | 340 | { |
341 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
342 | "process_pending_messages called, but client is null, reconnecting\n"); | ||
338 | do_disconnect (handle); | 343 | do_disconnect (handle); |
339 | return; | 344 | return; |
340 | } | 345 | } |
@@ -350,6 +355,8 @@ process_pending_messages (struct GNUNET_DHT_Handle *handle) | |||
350 | handle); | 355 | handle); |
351 | if (NULL != handle->th) | 356 | if (NULL != handle->th) |
352 | return; | 357 | return; |
358 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
359 | "notify_transmit_ready returned NULL, reconnecting\n"); | ||
353 | do_disconnect (handle); | 360 | do_disconnect (handle); |
354 | } | 361 | } |
355 | 362 | ||
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) | |||
548 | return GNUNET_YES; | 548 | return GNUNET_YES; |
549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 549 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
550 | "Removing client %p's record for key %s (by unique id)\n", | 550 | "Removing client %p's record for key %s (by unique id)\n", |
551 | ctx->client, | 551 | ctx->client->client_handle, |
552 | GNUNET_h2s (key)); | 552 | GNUNET_h2s (key)); |
553 | return remove_client_records (ctx->client, key, record); | 553 | return remove_client_records (ctx->client, key, record); |
554 | } | 554 | } |