Skip to content

Commit

Permalink
review comment
Browse files Browse the repository at this point in the history
  • Loading branch information
neonphog committed Jan 6, 2025
1 parent 89b48a2 commit 9afa6cc
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions crates/core/src/factories/core_space.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,16 @@ async fn check_agent_infos(

for agent in agents {
// is this agent going to expire?
let should_re_sign = if let Ok(Some(info)) =
peer_store.get(agent.agent().clone()).await
let should_re_sign = match peer_store
.get(agent.agent().clone())
.await
{
info.expires_at <= cutoff
} else {
true
Ok(Some(info)) => info.expires_at <= cutoff,
Ok(None) => true,
Err(err) => {
tracing::debug!(?err, "error fetching agent in re-signing before expiry logic");
true
}
};

if should_re_sign {
Expand Down

0 comments on commit 9afa6cc

Please sign in to comment.