diff options
author | Roger Dingledine <arma@torproject.org> | 2003-06-24 23:14:39 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2003-06-24 23:14:39 +0000 |
commit | ad917e77882bae5f1dbefae90d231bf0392fc884 (patch) | |
tree | 76100589738846c4b6efc829aa959b04f8e94285 /src/or | |
parent | dfdc93eccb2a98c40c886e984a8e3c9160bfdfea (diff) | |
download | tor-ad917e77882bae5f1dbefae90d231bf0392fc884.tar.gz tor-ad917e77882bae5f1dbefae90d231bf0392fc884.zip |
non-buggy robustness, even
svn:r353
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/or/main.c b/src/or/main.c index a9c3064d27..14d31a99b4 100644 --- a/src/or/main.c +++ b/src/or/main.c @@ -119,7 +119,7 @@ connection_t *connection_twin_get_by_addr_port(uint32_t addr, uint16_t port) { /* first check if it's there exactly */ conn = connection_exact_get_by_addr_port(addr,port); - if(conn && connection_state_is_open(conn) && !conn->marked_for_close) { + if(conn && connection_state_is_open(conn)) { log(LOG_INFO,"connection_twin_get_by_addr_port(): Found exact match."); return conn; } @@ -133,7 +133,9 @@ connection_t *connection_twin_get_by_addr_port(uint32_t addr, uint16_t port) { for(i=0;i<nfds;i++) { conn = connection_array[i]; assert(conn); - if(connection_state_is_open(conn) && !crypto_pk_cmp_keys(conn->pkey, router->pkey)) { + if(connection_state_is_open(conn) && + !conn->marked_for_close && + !crypto_pk_cmp_keys(conn->pkey, router->pkey)) { log(LOG_INFO,"connection_twin_get_by_addr_port(): Found twin (%s).",conn->address); return conn; } |