mirror of
https://github.com/iv-org/invidious.git
synced 2025-01-09 19:10:34 +05:30
Delete broken clients from the pool explicitly
This commit is contained in:
parent
e3313d3ecd
commit
39afb3379a
@ -33,9 +33,9 @@ module Invidious::ConnectionPool
|
|||||||
response = yield http_client
|
response = yield http_client
|
||||||
|
|
||||||
return response
|
return response
|
||||||
rescue ex : DB::Error
|
rescue ex
|
||||||
# Prevent broken client from being checked back into the pool
|
# 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)
|
raise ConnectionPool::Error.new(ex.message, cause: ex)
|
||||||
end
|
end
|
||||||
rescue ex : DB::PoolTimeout
|
rescue ex : DB::PoolTimeout
|
||||||
|
Loading…
Reference in New Issue
Block a user