tor

The Tor anonymity network
git clone https://git.dasho.dev/tor.git
Log | Files | Refs | README | LICENSE

commit 9d29abb34e005f4e836976a4c00115a1e8977071
parent b0ae6a332a0882a670b3a2bacf5c70b69936e4bc
Author: Taylor Yu <catalyst@torproject.org>
Date:   Fri, 21 Dec 2018 11:38:58 -0600

Add a comment about bto_update_best.

Diffstat:
Msrc/feature/control/btrack_orconn.c | 3+++
1 file changed, 3 insertions(+), 0 deletions(-)

diff --git a/src/feature/control/btrack_orconn.c b/src/feature/control/btrack_orconn.c @@ -62,6 +62,9 @@ bto_update_best(const bt_orconn_t *bto, bto_best_t *best, const char *type) { if (bto->state < best->state) return false; + /* Update even if we won't change best->state, because it's more + * recent information that a particular connection transitioned to + * that state. */ best->gid = bto->gid; if (bto->state > best->state) { log_info(LD_BTRACK, "ORCONN BEST_%s state %d->%d gid=%"PRIu64, type,