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