aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-02-28 03:06:31 +0000
committerNick Mathewson <nickm@torproject.org>2004-02-28 03:06:31 +0000
commit88e222ff76e3643b20589dde8f0002ce8c559dc0 (patch)
treeac860237df65f045571f93d2c2810e08c0af13da /src/or/connection.c
parentd0ad9b147ac4b0d3738d80b78b20070cc6aba592 (diff)
downloadtor-88e222ff76e3643b20589dde8f0002ce8c559dc0.tar
tor-88e222ff76e3643b20589dde8f0002ce8c559dc0.tar.gz
Make has_sent_end irrelevant: only try to send end if reason is nonzero
svn:r1148
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 43e8339ac..7387afed3 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -167,9 +167,7 @@ _connection_mark_for_close(connection_t *conn, char reason)
case CONN_TYPE_AP:
if (conn->state == EXIT_CONN_STATE_RESOLVING)
dns_cancel_pending_resolve(conn->address, conn);
- if (reason < _MIN_END_STREAM_REASON || reason > _MAX_END_STREAM_REASON)
- reason = END_STREAM_REASON_MISC;
- if (!conn->has_sent_end &&
+ if (!conn->has_sent_end && reason &&
connection_edge_end(conn, reason, conn->cpath_layer) < 0)
return -1;
break;