don't upload your descriptor if rebuilding it failed

svn:r4352
This commit is contained in:
Roger Dingledine 2005-06-08 19:45:17 +00:00
parent 8b2a7ff9fe
commit 9ed7b53143
2 changed files with 3 additions and 3 deletions

View File

@ -162,7 +162,7 @@
/** How long do we keep DNS cache entries before purging them? */
#define MAX_DNS_ENTRY_AGE (150*60)
#else
#define MAX_DNS_ENTRY_AGE (15*60)
#define MAX_DNS_ENTRY_AGE (30*60)
#endif
/** How often do we rotate onion keys? */

View File

@ -500,8 +500,8 @@ static int decide_if_publishable_server(time_t now) {
void consider_publishable_server(time_t now, int force) {
if (decide_if_publishable_server(now)) {
set_server_advertised(1);
router_rebuild_descriptor(force);
router_upload_dir_desc_to_dirservers(force);
if (router_rebuild_descriptor(force) == 0)
router_upload_dir_desc_to_dirservers(force);
} else {
set_server_advertised(0);
}