summaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-05 00:22:56 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-05 00:22:56 +0000
commita60890507021f0c3e1607c164d5c952a392d9060 (patch)
treea0480ce1d0a8ade44aa32043c6d82dcf193df87b /src/or/directory.c
parent42e17182daa828760da8f839211618113c6ffdc4 (diff)
downloadtor-a60890507021f0c3e1607c164d5c952a392d9060.tar.gz
tor-a60890507021f0c3e1607c164d5c952a392d9060.zip
Give a less frequent and more helpful warning on failed serverdesc downloads
svn:r5187
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/directory.c b/src/or/directory.c
index 19cf41f9d7..29e3871b3e 100644
--- a/src/or/directory.c
+++ b/src/or/directory.c
@@ -1113,8 +1113,9 @@ connection_dir_reached_eof(connection_t *conn)
log_fn(LOG_INFO,"conn reached eof, not reading. Closing.");
/* This check is temporary; it's to let us know whether we should consider
* parsing partial serverdesc responses. */
- if (conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC) {
- log_fn(LOG_NOTICE, "Reached EOF while downloading server descriptors; dropping %d bytes.",
+ if (conn->purpose == DIR_PURPOSE_FETCH_SERVERDESC &&
+ buf_datalen(conn->inbuf)>=(24*1024)) {
+ log_fn(LOG_NOTICE, "Directory connection closed early after downloading %d bytes of descriptors. If this happens often, please file a bug report.",
buf_datalen(conn->inbuf));
}
connection_close_immediate(conn); /* it was an error; give up on flushing */