diff options
Diffstat (limited to 'src/or/directory.c')
-rw-r--r-- | src/or/directory.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/or/directory.c b/src/or/directory.c index f3f4025cd..4506cf945 100644 --- a/src/or/directory.c +++ b/src/or/directory.c @@ -48,8 +48,7 @@ void directory_initiate_command(routerinfo_t *router, int command) { switch(connection_connect(conn, router->address, router->addr, router->dir_port)) { case -1: router_mark_as_down(conn->nickname); /* don't try him again */ - connection_remove(conn); - connection_free(conn); + connection_mark_for_close(conn, 0); return; case 0: connection_set_poll_socket(conn); @@ -63,8 +62,7 @@ void directory_initiate_command(routerinfo_t *router, int command) { connection_set_poll_socket(conn); if(directory_send_command(conn, command) < 0) { - connection_remove(conn); - connection_free(conn); + connection_mark_for_close(conn, 0); } } |