aboutsummaryrefslogtreecommitdiff
path: root/src/or/connection.c
diff options
context:
space:
mode:
authorRoger Dingledine <arma@torproject.org>2004-01-31 00:36:00 +0000
committerRoger Dingledine <arma@torproject.org>2004-01-31 00:36:00 +0000
commitf00dc6fe1e576a82244b08f488553abfd3bf01a3 (patch)
treef98a3717b29a87b49a40b11e90de099b56b050cf /src/or/connection.c
parentddcc03acd291c92bedab6e20216200f12a83fede (diff)
downloadtor-f00dc6fe1e576a82244b08f488553abfd3bf01a3.tar
tor-f00dc6fe1e576a82244b08f488553abfd3bf01a3.tar.gz
last minute fix: don't early-flush non-tls streams
e.g., this breaks directory service svn:r1033
Diffstat (limited to 'src/or/connection.c')
-rw-r--r--src/or/connection.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/connection.c b/src/or/connection.c
index e2993fab3..211152a68 100644
--- a/src/or/connection.c
+++ b/src/or/connection.c
@@ -530,8 +530,8 @@ void connection_write_to_buf(const char *string, int len, connection_t *conn) {
* push data out as soon as we know there's enough for a tls record, so
* during periods of high load we won't read the entire megabyte from
* input before pushing any data out. */
-/* We follow the same algorithm for non-tls streams, because hey, why not. */
- if(conn->outbuf_flushlen < MIN_TLS_FLUSHLEN &&
+ if(connection_speaks_cells(conn) &&
+ conn->outbuf_flushlen < MIN_TLS_FLUSHLEN &&
conn->outbuf_flushlen+len >= MIN_TLS_FLUSHLEN) {
len -= (MIN_TLS_FLUSHLEN - conn->outbuf_flushlen);
conn->outbuf_flushlen = MIN_TLS_FLUSHLEN;