diff options
author | Nick Mathewson <nickm@torproject.org> | 2005-06-08 20:17:32 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2005-06-08 20:17:32 +0000 |
commit | b0538591c7692abd372f3690e7c2c7e46daf8810 (patch) | |
tree | f381311a5b1b68b58b534cdc5297eac2b727dea4 /src | |
parent | 9ed7b53143be20fd6286bbd220597d7ff5bb52c1 (diff) | |
download | tor-b0538591c7692abd372f3690e7c2c7e46daf8810.tar.gz tor-b0538591c7692abd372f3690e7c2c7e46daf8810.zip |
Reset buf->highwater every time buf_shrink is called, not just on suffessful shrink.
svn:r4353
Diffstat (limited to 'src')
-rw-r--r-- | src/or/buffers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/buffers.c b/src/or/buffers.c index cf425be0f2..98dafb76b6 100644 --- a/src/or/buffers.c +++ b/src/or/buffers.c @@ -284,13 +284,13 @@ buf_shrink(buf_t *buf) while (buf->highwater < (new_len>>2) && new_len > MIN_LAZY_SHRINK_SIZE*2) new_len >>= 1; + buf->highwater = buf->datalen; if (new_len == buf->len) return; log_fn(LOG_DEBUG,"Shrinking buffer from %d to %d bytes.", (int)buf->len, (int)new_len); buf_resize(buf, new_len); - buf->highwater = buf->datalen; } /** Remove the first <b>n</b> bytes from buf. |