From d5496d0a712c3f9becb7005d440bbeb63e708bbc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Charlotte=20=F0=9F=A6=9D=20Delenk?= Date: Sun, 8 Dec 2024 19:38:27 +0100 Subject: [PATCH] fix calculation for what the minimum acceptable session id is --- chir-rs-db/src/session.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chir-rs-db/src/session.rs b/chir-rs-db/src/session.rs index fba7ed6..f15de3a 100644 --- a/chir-rs-db/src/session.rs +++ b/chir-rs-db/src/session.rs @@ -19,7 +19,7 @@ use tracing::{error, info, instrument}; #[instrument] pub async fn expire(db: &Database) -> Result<()> { let id = id_generator::generate(); - let oldest_acceptable_id = id - ((24 * 60 * 60) << 48); + let oldest_acceptable_id = id - ((24 * 60 * 60 * 1_000_000_000) << 48); let oldest_acceptable_id = oldest_acceptable_id.to_be_bytes(); #[expect(clippy::panic, reason = "sqlx moment")] query!(