aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-10-24 03:04:05 +0000
committerNick Mathewson <nickm@torproject.org>2005-10-24 03:04:05 +0000
commit37708e9b1b619234822628fd77486fe02b58bce7 (patch)
treeac05b976949afa9419dce3dca8c95174840f8f38 /src/or
parentd6dcd973c3c6a1d257f5e8a99924d920dc591489 (diff)
downloadtor-37708e9b1b619234822628fd77486fe02b58bce7.tar
tor-37708e9b1b619234822628fd77486fe02b58bce7.tar.gz
Avoid potential infinite recursion when building a descriptor
svn:r5292
Diffstat (limited to 'src/or')
-rw-r--r--src/or/router.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/or/router.c b/src/or/router.c
index 92ce6e0b4..d2865cc80 100644
--- a/src/or/router.c
+++ b/src/or/router.c
@@ -402,10 +402,9 @@ int
check_whether_dirport_reachable(void)
{
or_options_t *options = get_options();
- routerinfo_t *ri = router_get_my_routerinfo();
return !options->DirPort ||
options->AssumeReachable ||
- (ri && !ri->dir_port) ||
+ we_are_hibernating() ||
can_reach_dir_port;
}