Skip to content

Commit

Permalink
ames: fix _ames_lane_from_cache logic to return the head always
Browse files Browse the repository at this point in the history
  • Loading branch information
pkova committed Nov 6, 2023
1 parent c6dbc60 commit 7886782
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/vere/io/ames.c
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ _ames_lane_into_cache(u3p(u3h_root) lax_p, u3_noun who, u3_noun las) {
/* _ames_lane_from_cache(): retrieve lane for who from cache, if any
*/
static u3_weak
_ames_lane_from_cache(u3p(u3h_root) lax_p, u3_noun who, c3_o nal) {
_ames_lane_from_cache(u3p(u3h_root) lax_p, u3_noun who, c3_o nal_o) {
u3_weak lac = u3h_git(lax_p, who);

if (nal == c3n && u3_none != lac ) {
Expand All @@ -935,7 +935,7 @@ _ames_lane_from_cache(u3p(u3h_root) lax_p, u3_noun who, c3_o nal) {

// consider entries older than 2 minutes stale, ignore them
//
if ( 120000 > u3_time_gap_ms(u3k(den), now) ) {
if ( nal_o == c3y || 120000 > u3_time_gap_ms(u3k(den), now) ) {
lac = u3k(u3h(lac));
} else {
lac = u3_none;
Expand Down

0 comments on commit 7886782

Please sign in to comment.