aboutsummaryrefslogtreecommitdiff
path: root/src/or/relay.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2016-09-22 15:20:31 -0400
committerNick Mathewson <nickm@torproject.org>2016-09-22 15:20:31 -0400
commit077f6a4888e88a4895e7b2234ff2fd81412307d0 (patch)
tree19afb7b837c4e37b331b042753cb62bb3917555f /src/or/relay.c
parent0baa276ea9673ba1c7efce009d30a4afb4f63a6a (diff)
parentd78711c0ae83c505a966791a18a6b8d5b7e4a8d1 (diff)
downloadtor-077f6a4888e88a4895e7b2234ff2fd81412307d0.tar.gz
tor-077f6a4888e88a4895e7b2234ff2fd81412307d0.zip
Merge branch 'maint-0.2.8'
Diffstat (limited to 'src/or/relay.c')
-rw-r--r--src/or/relay.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/or/relay.c b/src/or/relay.c
index 5fedba28a3..1794215378 100644
--- a/src/or/relay.c
+++ b/src/or/relay.c
@@ -2613,6 +2613,15 @@ channel_flush_from_first_active_circuit, (channel_t *chan, int max))
}
/* Circuitmux told us this was active, so it should have cells */
+ if (/*BUG(*/ queue->n == 0 /*)*/) {
+ log_warn(LD_BUG, "Found a supposedly active circuit with no cells "
+ "to send. Trying to recover.");
+ circuitmux_set_num_cells(cmux, circ, 0);
+ if (! circ->marked_for_close)
+ circuit_mark_for_close(circ, END_CIRC_REASON_INTERNAL);
+ continue;
+ }
+
tor_assert(queue->n > 0);
/*