diff options
author | Taylor Yu <catalyst@torproject.org> | 2018-12-21 11:38:58 -0600 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-12-21 14:15:21 -0500 |
commit | 9d29abb34e005f4e836976a4c00115a1e8977071 (patch) | |
tree | 3965679de640ecf79f926e1a84e0580fb91b42ed /src/feature | |
parent | b0ae6a332a0882a670b3a2bacf5c70b69936e4bc (diff) | |
download | tor-9d29abb34e005f4e836976a4c00115a1e8977071.tar.gz tor-9d29abb34e005f4e836976a4c00115a1e8977071.zip |
Add a comment about bto_update_best.
Diffstat (limited to 'src/feature')
-rw-r--r-- | src/feature/control/btrack_orconn.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/feature/control/btrack_orconn.c b/src/feature/control/btrack_orconn.c index 69344569bf..28f8509fe2 100644 --- 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, |