From 38ade4e9851f33d057c1f999cdc54e8687703a2d Mon Sep 17 00:00:00 2001 From: AsamK Date: Wed, 9 Feb 2022 19:08:12 +0100 Subject: [PATCH] Close database connection before sleeping --- .../signal/manager/storage/sendLog/MessageSendLogStore.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/org/asamk/signal/manager/storage/sendLog/MessageSendLogStore.java b/lib/src/main/java/org/asamk/signal/manager/storage/sendLog/MessageSendLogStore.java index 98f4ac69..39ce64be 100644 --- a/lib/src/main/java/org/asamk/signal/manager/storage/sendLog/MessageSendLogStore.java +++ b/lib/src/main/java/org/asamk/signal/manager/storage/sendLog/MessageSendLogStore.java @@ -52,11 +52,11 @@ public class MessageSendLogStore implements AutoCloseable { while (true) { try (final var connection = database.getConnection()) { deleteOutdatedEntries(connection); - Thread.sleep(interval); } catch (SQLException e) { logger.warn("Deleting outdated entries failed"); break; } + Thread.sleep(interval); } } catch (InterruptedException e) { logger.debug("Stopping msl cleanup thread");