mirror of
https://github.com/neondatabase/neon.git
synced 2026-05-26 01:20:38 +00:00
@@ -181,8 +181,8 @@ impl LsnLease {
|
||||
pub const DEFAULT_LENGTH: Duration = Duration::from_secs(10 * 60);
|
||||
|
||||
/// Checks whether the lease is expired.
|
||||
pub fn is_expired(&self) -> bool {
|
||||
SystemTime::now() > self.valid_until
|
||||
pub fn is_expired(&self, now: &SystemTime) -> bool {
|
||||
now > &self.valid_until
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user