summaryrefslogtreecommitdiff
path: root/src/or/buffers.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/buffers.c')
-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 81d54d648f..4e525db1b3 100644
--- a/src/or/buffers.c
+++ b/src/or/buffers.c
@@ -1964,7 +1964,7 @@ fetch_from_evbuffer_socks_client(struct evbuffer *buf, int state,
r = parse_socks_client(data, datalen, state, reason, &drain);
if (drain > 0)
evbuffer_drain(buf, drain);
- else
+ else if (drain < 0)
evbuffer_drain(buf, evbuffer_get_length(buf));
return r;