From a961732f5f52c7bbba11335f84b3f0ceae9e9404 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timo=20K=C3=B6sters?= Date: Sun, 11 Apr 2021 21:35:17 +0200 Subject: [PATCH] fix: overflow --- src/database/rooms/edus.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/database/rooms/edus.rs b/src/database/rooms/edus.rs index 9e43fe1..c48f4c2 100644 --- a/src/database/rooms/edus.rs +++ b/src/database/rooms/edus.rs @@ -382,7 +382,7 @@ impl RoomEdus { .ok()?, )) }) - .take_while(|(_, timestamp)| current_timestamp - timestamp > 5 * 60_000) + .take_while(|(_, timestamp)| current_timestamp.saturating_sub(*timestamp) > 5 * 60_000) // 5 Minutes { // Send new presence events to set the user offline