From a231b891dffa64fe82704965ba4847b1fac63e93 Mon Sep 17 00:00:00 2001 From: Pinga <121483313+getpinga@users.noreply.github.com> Date: Sat, 9 Dec 2023 13:16:19 +0200 Subject: [PATCH] Small fix --- automation/abusemonitor.php | 3 +++ automation/write-zone.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/automation/abusemonitor.php b/automation/abusemonitor.php index e31ca65..c569974 100644 --- a/automation/abusemonitor.php +++ b/automation/abusemonitor.php @@ -86,5 +86,8 @@ Coroutine::create(function () use ($pool, $log) { $log->error('Database error: ' . $e->getMessage()); } catch (Throwable $e) { $log->error('Error: ' . $e->getMessage()); + } finally { + // Return the connection to the pool + $pool->put($pdo); } }); \ No newline at end of file diff --git a/automation/write-zone.php b/automation/write-zone.php index 5b06d8c..1f70fc7 100644 --- a/automation/write-zone.php +++ b/automation/write-zone.php @@ -196,5 +196,8 @@ Coroutine::create(function () use ($pool, $log, $c) { $log->error('Database error: ' . $e->getMessage()); } catch (Throwable $e) { $log->error('Error: ' . $e->getMessage()); + } finally { + // Return the connection to the pool + $pool->put($pdo); } }); \ No newline at end of file