summaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 18c236fe66..94cca5caf8 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -2263,7 +2263,8 @@ channel_flush_some_cells(channel_t *chan, ssize_t num_cells)
/* Now process the queue if necessary */
- if (q_len_after > q_len_before && num_cells < flushed) {
+ if ((q_len_after > q_len_before) &&
+ (unlimited || (flushed < num_cells))) {
flushed += channel_flush_some_cells_from_outgoing_queue(chan,
(unlimited ? -1 : num_cells - flushed));
}