diff options
Diffstat (limited to 'lib/rubygems/request/http_pool.rb')
-rw-r--r-- | lib/rubygems/request/http_pool.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/rubygems/request/http_pool.rb b/lib/rubygems/request/http_pool.rb index 61c8884af7..c9a1858b98 100644 --- a/lib/rubygems/request/http_pool.rb +++ b/lib/rubygems/request/http_pool.rb @@ -23,6 +23,15 @@ class Gem::Request::HTTPPool # :nodoc: @queue.push connection end + def close_all + until @queue.empty? + if connection = @queue.pop(true) and connection.started? + connection.finish + end + end + @queue.push(nil) + end + private def make_connection |