aboutsummaryrefslogtreecommitdiff
path: root/src/or/directory.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-03-21 03:18:45 +0000
committerNick Mathewson <nickm@torproject.org>2004-03-21 03:18:45 +0000
commitf608b85ddf25ab5c48473d9d922fdf420e8a2507 (patch)
treea978cc98ad537bcbf80ef74eca52da71fd7db263 /src/or/directory.c
parentb7c2b18bd696f79e6866ae70c58373dfbedf91f0 (diff)
downloadtor-f608b85ddf25ab5c48473d9d922fdf420e8a2507.tar
tor-f608b85ddf25ab5c48473d9d922fdf420e8a2507.tar.gz
Replace all connection_removes outsice of main.c with connection_mark_for_close
svn:r1328
Diffstat (limited to 'src/or/directory.c')
-rw-r--r--src/or/directory.c6
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);
}
}