diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-08-24 17:30:20 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-08-24 17:31:37 -0400 |
commit | dfcd3d9ce00dedcf00124c9329985c5522f286dc (patch) | |
tree | 2b8e5ef9064ad4340708f974d4c9ee2052201be3 /src/or | |
parent | f186e16241f7d6a0090260f87ce412a0fb7ec47a (diff) | |
download | tor-dfcd3d9ce00dedcf00124c9329985c5522f286dc.tar tor-dfcd3d9ce00dedcf00124c9329985c5522f286dc.tar.gz |
Set write low-watermarks on all bufferevents.
If we don't do this, then we never invoke the bufferevent write
callbacks until all the bufferevent's data is flushed.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/connection.c b/src/or/connection.c index c4cbef4c9..dc804ddce 100644 --- a/src/or/connection.c +++ b/src/or/connection.c @@ -2947,6 +2947,11 @@ connection_configure_bufferevent_callbacks(connection_t *conn) connection_handle_write_cb, connection_handle_event_cb, conn); + /* Set a fairly high write low-watermark so that we get the write callback + called whenever data is written to bring us under 128K. Leave the + high-watermark at 0. + */ + bufferevent_setwatermark(bufev, EV_WRITE, 128*1024, 0); input = bufferevent_get_input(bufev); output = bufferevent_get_output(bufev); |