Skip to content

Commit

Permalink
Rename expired_at to expired_in where it concerns a duration
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Nov 22, 2024
1 parent 2fbf0cb commit b4c4af3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/src/core/comms/secure_channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1071,16 +1071,16 @@ impl SecureChannel {
self.remote_keys
.retain(|_, v| DateTime::now() < v.expires_at);

let expires_at = (self.token_lifetime as f32 * 1.25).ceil();
let expires_at = Duration::milliseconds(expires_at as i64);
let expires_in = (self.token_lifetime as f32 * 1.25).ceil();
let expires_in = Duration::milliseconds(expires_in as i64);

// Then insert the new keys to ensure there is
// always at least one set of keys available.
self.remote_keys.insert(
self.token_id,
RemoteKeys {
keys,
expires_at: self.token_created_at + expires_at,
expires_at: self.token_created_at + expires_in,
},
);
}
Expand Down

0 comments on commit b4c4af3

Please sign in to comment.