From e79a578feca34e01d4d71fa5c824f84fe649993a Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 7 Apr 2004 22:41:00 +0000 Subject: if the rend desc cache entry was fetched more than 15 mins ago, then try to fetch a new one. but if the new fetch fails, use the old one. svn:r1540 --- src/or/directory.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'src/or/directory.c') diff --git a/src/or/directory.c b/src/or/directory.c index 1af6bf59d..6a9fb40f4 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -275,16 +275,18 @@ int connection_dir_process_inbuf(connection_t *conn) { switch(status_code) { case 200: if(rend_cache_store(body, body_len) < 0) { - log_fn(LOG_WARN,"Failed to store rendezvous descriptor. Abandoning stream."); - /* alice's ap_stream is just going to have to time out. */ + log_fn(LOG_WARN,"Failed to store rendezvous descriptor."); + /* alice's ap_stream will notice when connection_mark_for_close + * cleans it up */ } else { /* success. notify pending connections about this. */ rend_client_desc_fetched(conn->rend_query, 1); + conn->purpose = DIR_PURPOSE_HAS_FETCHED_RENDDESC; } break; case 404: - /* not there. also notify pending connections. */ - rend_client_desc_fetched(conn->rend_query, 0); + /* not there. pending connections will be notified when + * connection_mark_for_close cleans it up. */ break; case 400: log_fn(LOG_WARN,"http status 400 (bad request). Dirserver didn't like our rendezvous query?"); -- cgit v1.2.3