mirror of
https://github.com/iv-org/invidious.git
synced 2025-04-25 08:06:28 +00:00
Delete broken clients from the pool explicitly
This commit is contained in:
parent
4fd6f797e8
commit
0d5887c257
@ -42,9 +42,9 @@ module Invidious::ConnectionPool
|
||||
response = yield http_client
|
||||
|
||||
return response
|
||||
rescue ex : DB::Error
|
||||
rescue ex
|
||||
# Prevent broken client from being checked back into the pool
|
||||
http_client.close
|
||||
pool.delete(http_client)
|
||||
raise ConnectionPool::Error.new(ex.message, cause: ex)
|
||||
end
|
||||
rescue ex : DB::PoolTimeout
|
||||
|
Loading…
x
Reference in New Issue
Block a user