diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-09-26 16:37:39 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-09-26 16:37:39 +0000 |
commit | 126a1e3e3283dcc13cd5dd38ec5ae80cb8b1e745 (patch) | |
tree | a3067e87525323d765cff6b4c680756e4e692890 | |
parent | 066b58438a8b6436b863be5048535f0d8c16318d (diff) | |
download | tor-126a1e3e3283dcc13cd5dd38ec5ae80cb8b1e745.tar.gz tor-126a1e3e3283dcc13cd5dd38ec5ae80cb8b1e745.zip |
Fix crash-on-wakeup bug in networkstatus download.
svn:r5144
-rw-r--r-- | src/or/directory.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index 0e5da0bf4c..cd144a3bd0 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -296,6 +296,12 @@ connection_dir_request_failed(connection_t *conn) static void connection_dir_download_networkstatus_failed(connection_t *conn) { + if (!conn->requested_resource) { + /* We never reached directory_send_command, which means that we never + * opened a network connection. Either we're out of sockets, or the + * network is down. Either way, retrying would be pointless. */ + return; + } if (!strcmpstart(conn->requested_resource, "all")) { /* We're a non-authoritative directory cache; try again. */ directory_get_from_dirserver(conn->purpose, "all.z", |