diff options
Diffstat (limited to 'lib/rubygems/request/http_pool.rb')
-rw-r--r-- | lib/rubygems/request/http_pool.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/rubygems/request/http_pool.rb b/lib/rubygems/request/http_pool.rb index f028516db8..52543de41f 100644 --- a/lib/rubygems/request/http_pool.rb +++ b/lib/rubygems/request/http_pool.rb @@ -1,4 +1,5 @@ # frozen_string_literal: true + ## # A connection "pool" that only manages one connection for now. Provides # thread safe `checkout` and `checkin` methods. The pool consists of one @@ -26,7 +27,7 @@ class Gem::Request::HTTPPool # :nodoc: def close_all until @queue.empty? - if connection = @queue.pop(true) and connection.started? + if (connection = @queue.pop(true)) && connection.started? connection.finish end end |