summaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-07-18 15:38:05 -0400
committerNick Mathewson <nickm@torproject.org>2011-07-18 15:43:16 -0400
commit218e84b634d10c25a6d5d002a983ddb051278bdf (patch)
treeacf0656ba1065c7fad0a4c80dec607bb05509830 /src/or/connection.c
parent34a52534bb43b30e19267968807a540ba33abe3b (diff)
downloadtor-218e84b634d10c25a6d5d002a983ddb051278bdf.tar.gz
tor-218e84b634d10c25a6d5d002a983ddb051278bdf.zip
Remember optimistically sent data until we have gotten a CONNECTED
Since we can retry failed streams under some circumstances, we need to be ready to send data queued on them.
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index 8b9fb126d3..1ccd2b6608 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -444,7 +444,12 @@ _connection_free(connection_t *conn)
tor_free(edge_conn->chosen_exit_name);
if (edge_conn->socks_request)
socks_request_free(edge_conn->socks_request);
-
+ if (edge_conn->pending_optimistic_data) {
+ generic_buffer_free(edge_conn->pending_optimistic_data);
+ }
+ if (edge_conn->sending_optimistic_data) {
+ generic_buffer_free(edge_conn->sending_optimistic_data);
+ }
rend_data_free(edge_conn->rend_data);
}
if (conn->type == CONN_TYPE_CONTROL) {