summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2005-06-08 20:17:32 +0000
committerNick Mathewson <nickm@torproject.org>2005-06-08 20:17:32 +0000
commitb0538591c7692abd372f3690e7c2c7e46daf8810 (patch)
treef381311a5b1b68b58b534cdc5297eac2b727dea4 /src
parent9ed7b53143be20fd6286bbd220597d7ff5bb52c1 (diff)
downloadtor-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.c2
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.