diff options
author | Roger Dingledine <arma@torproject.org> | 2004-02-28 23:52:56 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2004-02-28 23:52:56 +0000 |
commit | ae67c488054affc618cd4dadbda51000cdbd866a (patch) | |
tree | a614726cf3780b1a8d5771e9b58d9c19925543ff /src/or | |
parent | 3fb9c869a8ae77c110ee8e6d997725dac4f09291 (diff) | |
download | tor-ae67c488054affc618cd4dadbda51000cdbd866a.tar.gz tor-ae67c488054affc618cd4dadbda51000cdbd866a.zip |
bugfix: in some cases, connection_mark_for_close wasn't marking the conn
svn:r1174
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 526d2aafcb..1ebc65aadd 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -160,6 +160,7 @@ void connection_close_immediate(connection_t *conn) int _connection_mark_for_close(connection_t *conn, char reason) { + int retval = 0; assert_connection_ok(conn,0); if (conn->marked_for_close) { @@ -185,7 +186,7 @@ _connection_mark_for_close(connection_t *conn, char reason) connection_dns_remove(conn); if (!conn->has_sent_end && reason && connection_edge_end(conn, reason, conn->cpath_layer) < 0) - return -1; + retval = -1; break; case CONN_TYPE_DNSWORKER: if (conn->state == DNSWORKER_STATE_BUSY) { @@ -197,7 +198,7 @@ _connection_mark_for_close(connection_t *conn, char reason) ; } conn->marked_for_close = 1; - return 0; + return retval; } int connection_create_listener(char *bindaddress, uint16_t bindport, int type) { |