aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index 3072effc8f..ffd68493d0 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -2682,6 +2682,14 @@ int
channel_send_destroy(circid_t circ_id, channel_t *chan, int reason)
{
tor_assert(chan);
+ if (circ_id == 0) {
+ log_warn(LD_BUG, "Attempted to send a destroy cell for circID 0 "
+ "on a channel " U64_FORMAT " at %p in state %s (%d)",
+ U64_PRINTF_ARG(chan->global_identifier),
+ chan, channel_state_to_string(chan->state),
+ chan->state);
+ return 0;
+ }
/* Check to make sure we can send on this channel first */
if (!(chan->state == CHANNEL_STATE_CLOSING ||