diff options
author | Christian Grothoff <christian@grothoff.org> | 2011-07-19 13:33:55 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2011-07-19 13:33:55 +0000 |
commit | d3786eda65f30acf0178b8eb208c4e1ee18a6684 (patch) | |
tree | 4c7d7483b86f162a5604bf78e94b039dc769fb08 /src | |
parent | 2d59b3649626bd7eab7f5555824cb568a71ca25a (diff) | |
download | gnunet-d3786eda65f30acf0178b8eb208c4e1ee18a6684.tar.gz gnunet-d3786eda65f30acf0178b8eb208c4e1ee18a6684.zip |
first disconnect from core to handle disconnect events nicely -- likely cause of #1724
Diffstat (limited to 'src')
-rw-r--r-- | src/dht/gnunet-service-dht.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/dht/gnunet-service-dht.c b/src/dht/gnunet-service-dht.c index be635d4a0..626ca79f4 100644 --- a/src/dht/gnunet-service-dht.c +++ b/src/dht/gnunet-service-dht.c | |||
@@ -4998,6 +4998,15 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
4998 | NULL); | 4998 | NULL); |
4999 | GNUNET_TRANSPORT_disconnect (transport_handle); | 4999 | GNUNET_TRANSPORT_disconnect (transport_handle); |
5000 | } | 5000 | } |
5001 | if (coreAPI != NULL) | ||
5002 | { | ||
5003 | #if DEBUG_DHT | ||
5004 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
5005 | "%s:%s Disconnecting core!\n", my_short_id, "DHT"); | ||
5006 | #endif | ||
5007 | GNUNET_CORE_disconnect (coreAPI); | ||
5008 | coreAPI = NULL; | ||
5009 | } | ||
5001 | for (bucket_count = lowest_bucket; bucket_count < MAX_BUCKETS; | 5010 | for (bucket_count = lowest_bucket; bucket_count < MAX_BUCKETS; |
5002 | bucket_count++) | 5011 | bucket_count++) |
5003 | { | 5012 | { |
@@ -5012,15 +5021,6 @@ shutdown_task (void *cls, const struct GNUNET_SCHEDULER_TaskContext *tc) | |||
5012 | delete_peer (pos, bucket_count); | 5021 | delete_peer (pos, bucket_count); |
5013 | } | 5022 | } |
5014 | } | 5023 | } |
5015 | if (coreAPI != NULL) | ||
5016 | { | ||
5017 | #if DEBUG_DHT | ||
5018 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | ||
5019 | "%s:%s Disconnecting core!\n", my_short_id, "DHT"); | ||
5020 | #endif | ||
5021 | GNUNET_CORE_disconnect (coreAPI); | ||
5022 | coreAPI = NULL; | ||
5023 | } | ||
5024 | if (datacache != NULL) | 5024 | if (datacache != NULL) |
5025 | { | 5025 | { |
5026 | #if DEBUG_DHT | 5026 | #if DEBUG_DHT |