From e3fd91755da1a2873b99b62a360fd27254a05b11 Mon Sep 17 00:00:00 2001 From: Roger Dingledine Date: Wed, 2 Oct 2002 04:07:33 +0000 Subject: [PATCH] preemptive bugfix svn:r129 --- src/or/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/or/main.c b/src/or/main.c index ff89dd7578..971a34b8b1 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -226,8 +226,8 @@ void check_conn_read(int i) { retval = connection_dir_handle_listener_read(conn); } else { retval = connection_read_to_buf(conn); - if (retval < 0 && conn->type == CONN_TYPE_DIR) { - /* as a special case: forget about this router */ + if (retval < 0 && conn->type == CONN_TYPE_DIR && conn->state == DIR_CONN_STATE_CONNECTING) { + /* it's a directory server and connecting failed: forget about this router */ router_forget_router(conn->addr,conn->port); } if (retval >= 0) { /* all still well */