diff options
author | Nick Mathewson <nickm@torproject.org> | 2015-08-06 12:58:18 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2015-08-06 12:58:18 -0400 |
commit | 887d86b76d0c10883c1516fc19e8b796a70479cf (patch) | |
tree | ac0db2bb3bc05b3e698ce57d7b74b4a6c7cdf34c /src/or | |
parent | e86c3b283a20e496e387f5d0fffbd408eee0e0d9 (diff) | |
parent | aadff62745bfa15816ba8c725d9b9cf17abb53d0 (diff) | |
download | tor-887d86b76d0c10883c1516fc19e8b796a70479cf.tar.gz tor-887d86b76d0c10883c1516fc19e8b796a70479cf.zip |
Merge remote-tracking branch 'public/decouple-write'
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection.c | 28 |
1 files changed, 0 insertions, 28 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index 2cca6e4cf9..ac36578069 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -4206,34 +4206,6 @@ connection_write_to_buf_impl_,(const char *string, size_t len, conn->outbuf_flushlen += buf_datalen(conn->outbuf) - old_datalen; } else { conn->outbuf_flushlen += len; - - /* Should we try flushing the outbuf now? */ - if (conn->in_flushed_some) { - /* Don't flush the outbuf when the reason we're writing more stuff is - * _because_ we flushed the outbuf. That's unfair. */ - return; - } - - if (conn->type == CONN_TYPE_CONTROL && - !connection_is_rate_limited(conn) && - conn->outbuf_flushlen-len < 1<<16 && - conn->outbuf_flushlen >= 1<<16) { - /* just try to flush all of it */ - } else - return; /* no need to try flushing */ - - if (connection_handle_write(conn, 0) < 0) { - if (!conn->marked_for_close) { - /* this connection is broken. remove it. */ - log_warn(LD_BUG, "unhandled error on write for " - "conn (type %d, fd %d); removing", - conn->type, (int)conn->s); - tor_fragile_assert(); - /* do a close-immediate here, so we don't try to flush */ - connection_close_immediate(conn); - } - return; - } } } |