drbrain / net-http-persistent

Thread-safe persistent connections with Net::HTTP
http://seattlerb.rubyforge.org/net-http-persistent
339 stars 117 forks source link

Handle timeout due to pool exhaustion #131

Open sbfaulkner opened 3 years ago

sbfaulkner commented 3 years ago

if the pool has no more available connections, it raises a timeout exception (ConnectionPool::TimeoutError which is a subclass of Timeout::Error)

however the ensure currently catches it and masks that exception with a ConnectionPool::Error: no connections are checked out

as far as I can tell, scoping the exception handling block a little tighter has no other impact than letting this exception through, so the consumer can actually detect the issue

any feedback/suggestions/alternatives welcome

cc @drbrain @tenderlove

sbfaulkner commented 11 months ago

rebased and re-bumped version

rud commented 11 months ago

I still find this a good set of changes