From 136ee71d725c37237f78ae46b2c8ed6f50764a68 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!(