Remove needless flush-on-write code.

Long ago, before we had cell queues, it was necessary to maybe call
connection_handle_write() from connectino_write_to_buf_impl() on OR
connections, so that we wouldn't get into a loop of reading infinite
amounts of data and queueing it all on an outbuf before bothering to
write any data.

If that doesn't sounds like what our code does now, you're right:
right now, we won't stick more than OR_CONN_HIGHWATER bytes of cells
on an outbuf, and we won't suck more than CELL_QUEUE_HIGHWATER_SIZE
cells off any edge connection. So, there's no more call for that
code.

Removing this code will simplify our data flow, and that should be
something we can all get behind.
This commit is contained in:
Nick Mathewson
2012-07-25 18:34:14 -04:00
parent a9d56289ee
commit d9746bd468
2 changed files with 12 additions and 24 deletions
+8
View File
@@ -0,0 +1,8 @@
o Minor bugfixes:
- Remove some now-needless code that tried to aggressively flush
OR connections as data was added to them. Since 0.2.0.1-alpha,
our cell queue logic has saved us from the failure mode that
this code was supposed to prevent. Removing this code will limit
the number of baroque control flow paths through Tor's network
logic. Reported pseudonymously on IRC. Fix for bug 6468;
bigfix on 0.2.0.1-alpha.