From e3313d3ecd9d13a90851206764042a429ba0d506 Mon Sep 17 00:00:00 2001 From: syeopite Date: Tue, 12 Nov 2024 08:57:55 -0800 Subject: [PATCH] Remove redundant pool.release pool.checkout(&block) already ensures that the checked out item will be released back into the pool --- src/invidious/connection/pool.cr | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/invidious/connection/pool.cr b/src/invidious/connection/pool.cr index cf5a918a..3841636c 100644 --- a/src/invidious/connection/pool.cr +++ b/src/invidious/connection/pool.cr @@ -37,8 +37,6 @@ module Invidious::ConnectionPool # Prevent broken client from being checked back into the pool http_client.close raise ConnectionPool::Error.new(ex.message, cause: ex) - ensure - pool.release(http_client) end rescue ex : DB::PoolTimeout # Failed to checkout a client