From adc5bb4d0486556d6f2be333f83f698cabf29a77 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Mon, 22 Jan 2007 20:57:26 +0000 Subject: [PATCH] r9723@catbus: nickm | 2007-01-22 15:47:17 -0500 Fix an XXXX012 in routerlist.c: when we do not have enough networkstatuses to launch router requests, do not launch router requests. Backport candidate. svn:r9388 --- ChangeLog | 4 ++++ src/or/routerlist.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 8cd02e99e3..438d49fe6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -39,6 +39,10 @@ Changes in version 0.1.2.7-alpha - 2007-??-?? correct order. - Free memory held in recently-completed DNS lookup attempts on exit. This was not a memory leak, but may have been hiding memory leaks. + - Don't launch requests for descriptors unless we have networkstatuses + from at least half of the authorities. This delays the first download + slightly under pathological circumstances, but can prevent us from + downloading a bunch of descriptors we don't need. o Minor features: - Check for addresses with invalid characters at the exit as well as at diff --git a/src/or/routerlist.c b/src/or/routerlist.c index 0f31a1f5e9..4ce32e8868 100644 --- a/src/or/routerlist.c +++ b/src/or/routerlist.c @@ -3765,7 +3765,7 @@ update_router_descriptor_client_downloads(time_t now) smartlist_len(networkstatus_list) <= get_n_v2_authorities()/2) { log_info(LD_DIR, "Not enough networkstatus documents to launch requests."); - /* XXX012 should we return here or something? */ + return; } downloadable = router_list_client_downloadable();