summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-12-07 16:37:32 +0000
committerRoger Dingledine <arma@torproject.org>2004-12-07 16:37:32 +0000
commit012255fe60af64f89d094da86e99534c94b63c34 (patch)
tree31a7784f84fbe0d39a2ca9a13d453d05c83c8212
parentbd5524bfc7df831a87cc512d8f9a554cd7a74c2d (diff)
downloadtor-012255fe60af64f89d094da86e99534c94b63c34.tar.gz
tor-012255fe60af64f89d094da86e99534c94b63c34.zip
fix the other half of the pipe race
svn:r3111
-rw-r--r--src/or/connection.c2
-rw-r--r--src/or/connection_edge.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 4f076c3d64..2669f074d2 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -236,6 +236,8 @@ void connection_about_to_close_connection(connection_t *conn)
if (conn->socks_request->has_finished == 0) {
log_fn(LOG_INFO,"Cleaning up AP -- sending socks reject.");
conn->hold_open_until_flushed = 1;
+ /* XXX this socks_reply never gets sent, since conn
+ * gets removed right after this function finishes. */
connection_ap_handshake_socks_reply(conn, NULL, 0, -1);
conn->socks_request->has_finished = 1;
} else {
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c
index 49d91f855a..53e7b68c81 100644
--- a/src/or/connection_edge.c
+++ b/src/or/connection_edge.c
@@ -45,9 +45,9 @@ int connection_edge_reached_eof(connection_t *conn) {
/* only mark it if not already marked. it's possible to
* get the 'end' right around when the client hangs up on us. */
connection_mark_for_close(conn);
+ conn->hold_open_until_flushed = 1; /* just because we shouldn't read
+ doesn't mean we shouldn't write */
}
- conn->hold_open_until_flushed = 1; /* just because we shouldn't read
- doesn't mean we shouldn't write */
return 0;
#endif
}