diff options
author | Roger Dingledine <arma@torproject.org> | 2005-06-08 04:55:06 +0000 |
---|---|---|
committer | Roger Dingledine <arma@torproject.org> | 2005-06-08 04:55:06 +0000 |
commit | aff308e6d9c132f905a70e9366c6f363461e3310 (patch) | |
tree | f4ad94cb7d7bd7e7a620c17743fbb88204e047e1 /src/or/connection.c | |
parent | f5fd5d920d78dac3d8726b2459c91371dbb12ade (diff) | |
download | tor-aff308e6d9c132f905a70e9366c6f363461e3310.tar.gz tor-aff308e6d9c132f905a70e9366c6f363461e3310.zip |
reenable the part of the code that tries to flush as soon as an OR outbuf
has a full tls record available. perhaps this will make OR outbufs not grow
as huge except in rare cases, thus saving lots of cpu time plus memory.
svn:r4343
Diffstat (limited to 'src/or/connection.c')
-rw-r--r-- | src/or/connection.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 9c9bea4517..263762f484 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -975,6 +975,9 @@ static int connection_receiver_bucket_should_increase(connection_t *conn) { int connection_handle_read(connection_t *conn) { int max_to_read=-1, try_to_read; + if (conn->marked_for_close) + return 0; /* do nothing */ + conn->timestamp_lastread = time(NULL); switch (conn->type) { @@ -1176,6 +1179,9 @@ int connection_handle_write(connection_t *conn) { tor_assert(!connection_is_listener(conn)); + if (conn->marked_for_close) + return 0; /* do nothing */ + conn->timestamp_lastwritten = now; /* Sometimes, "writable" means "connected". */ |