summaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2013-03-12 17:36:09 -0400
committerNick Mathewson <nickm@torproject.org>2013-03-12 17:36:09 -0400
commit16f2e4aa8ce76387c19687dd0c78c97929a852d6 (patch)
tree3f289a6454fd81cfe9c8e0187021af5d3e417923 /src/or
parentc6ca199888102a825f004f8613331f97525da486 (diff)
downloadtor-16f2e4aa8ce76387c19687dd0c78c97929a852d6.tar.gz
tor-16f2e4aa8ce76387c19687dd0c78c97929a852d6.zip
Don't warn about not sending a socks reply if we get a write error
If we get a write error on a SOCKS connection, we can't send a SOCKS reply, now can we? This bug has been here since 36baf7219, where we added the "hey, I'm closing an AP connection but I haven't finished the socks handshake!" message. It's bug 8427.
Diffstat (limited to 'src/or')
-rw-r--r--src/or/connection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index eac9c4f32b..75c1656206 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -3286,6 +3286,10 @@ connection_handle_write_impl(connection_t *conn, int force)
if (result < 0) {
if (CONN_IS_EDGE(conn))
connection_edge_end_errno(TO_EDGE_CONN(conn));
+ if (conn->type == CONN_TYPE_AP) {
+ /* writing failed; we couldn't send a SOCKS reply if we wanted to */
+ TO_ENTRY_CONN(conn)->socks_request->has_finished = 1;
+ }
connection_close_immediate(conn); /* Don't flush; connection is dead. */
connection_mark_for_close(conn);