aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection_edge.c
diff options
context:
space:
mode:
authorFabian Keil <fk@fabiankeil.de>2011-09-25 16:32:43 +0200
committerNick Mathewson <nickm@torproject.org>2012-05-16 11:37:31 -0400
commit2888644a9f268683ab70cc972b36efbbbe466a25 (patch)
tree3669663a76fe19dfeb3a6800dd70682e0d9223c7 /src/or/connection_edge.c
parent82ce43a70676013eb4b694465a826b9d469905aa (diff)
downloadtor-2888644a9f268683ab70cc972b36efbbbe466a25.tar
tor-2888644a9f268683ab70cc972b36efbbbe466a25.tar.gz
In connection_ap_handshake_process_socks(), mark the socks request as finished if a reply is send after a parse error
Silences the log message: [warn] {BUG} _connection_mark_unattached_ap(): Bug: stream (marked at connection_edge.c:2224) sending two socks replies? after the client triggered the "Tor is not an HTTP Proxy" response. No additional socks reply was sent, though.
Diffstat (limited to 'src/or/connection_edge.c')
-rw-r--r--src/or/connection_edge.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 3b053c7cc..ca4bf3ffe 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -2319,6 +2319,11 @@ connection_ap_handshake_process_socks(entry_connection_t *conn)
connection_write_to_buf((const char*)socks->reply, socks->replylen,
base_conn);
socks->replylen = 0;
+ if (sockshere == -1) {
+ /* An invalid request just got a reply, no additional
+ * one is necessary. */
+ socks->has_finished = 1;
+ }
}
if (sockshere == 0) {