Avoid potential infinite recursion when building a descriptor

svn:r5292
This commit is contained in:
Nick Mathewson 2005-10-24 03:04:05 +00:00
parent d6dcd973c3
commit 37708e9b1b

View File

@ -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;
}