aboutsummaryrefslogtreecommitdiff
path: root/src/or/channel.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-04-23 12:39:01 -0400
committerNick Mathewson <nickm@torproject.org>2014-04-23 12:39:01 -0400
commita770b74501a3faf6483c40735b70adae6fb95187 (patch)
tree0fcb8430ca965cef50a0b3b1ebaab648d0fefe69 /src/or/channel.c
parent985deaaaf7b7397857e02206e89392e0ee101077 (diff)
downloadtor-a770b74501a3faf6483c40735b70adae6fb95187.tar.gz
tor-a770b74501a3faf6483c40735b70adae6fb95187.zip
Improvements to #11553 fix based on review
Use a per-channel ratelim_t to control the rate at which we report failures for each channel. Explain why I picked N=32. Never return a zero circID. Thanks to Andrea and to cypherpunks.
Diffstat (limited to 'src/or/channel.c')
-rw-r--r--src/or/channel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/or/channel.c b/src/or/channel.c
index dfef703b1b..691da174ba 100644
--- a/src/or/channel.c
+++ b/src/or/channel.c
@@ -731,6 +731,9 @@ channel_init(channel_t *chan)
/* Init timestamp */
chan->timestamp_last_added_nonpadding = time(NULL);
+ /* Warn about exhausted circuit IDs no more than hourly. */
+ chan->last_warned_circ_ids_exhausted.rate = 3600;
+
/* Initialize queues. */
TOR_SIMPLEQ_INIT(&chan->incoming_queue);
TOR_SIMPLEQ_INIT(&chan->outgoing_queue);