diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-05-23 23:08:03 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-05-23 23:08:15 +0200 |
commit | 4b9c0d3a08c214719aa32d2cbd689c158634f12b (patch) | |
tree | 6ccdf18864ec3947814047cfc2cca105e1f88fbf /src | |
parent | 454935bd76a9106ad6eda4d5c3d0861d6e559777 (diff) | |
download | gnunet-4b9c0d3a08c214719aa32d2cbd689c158634f12b.tar.gz gnunet-4b9c0d3a08c214719aa32d2cbd689c158634f12b.zip |
fix bug where we might fail the resolution of the same DHT heap node twice due to async cleanup
Diffstat (limited to 'src')
-rw-r--r-- | src/gns/gnunet-service-gns_resolver.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gns/gnunet-service-gns_resolver.c b/src/gns/gnunet-service-gns_resolver.c index 8593e281e..d3c07e997 100644 --- a/src/gns/gnunet-service-gns_resolver.c +++ b/src/gns/gnunet-service-gns_resolver.c | |||
@@ -2400,7 +2400,8 @@ start_dht_request (struct GNS_ResolverHandle *rh, | |||
2400 | if (GNUNET_CONTAINER_heap_get_size (dht_lookup_heap) > max_allowed_background_queries) | 2400 | if (GNUNET_CONTAINER_heap_get_size (dht_lookup_heap) > max_allowed_background_queries) |
2401 | { | 2401 | { |
2402 | /* fail longest-standing DHT request */ | 2402 | /* fail longest-standing DHT request */ |
2403 | rx = GNUNET_CONTAINER_heap_peek (dht_lookup_heap); | 2403 | rx = GNUNET_CONTAINER_heap_remove_root (dht_lookup_heap); |
2404 | rx->dht_heap_node = NULL; | ||
2404 | GNUNET_assert (NULL != rx); | 2405 | GNUNET_assert (NULL != rx); |
2405 | fail_resolution (rx); | 2406 | fail_resolution (rx); |
2406 | } | 2407 | } |