In Files

  • bundler/mirror.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

Bundler::Settings::TCPSocketProbe

Class used for probing TCP availability for a given mirror.

Public Instance Methods

replies?(mirror) click to toggle source
 
               # File bundler/mirror.rb, line 149
def replies?(mirror)
  MirrorSockets.new(mirror).any? do |socket, address, timeout|
    begin
      socket.connect_nonblock(address)
    rescue Errno::EINPROGRESS
      wait_for_writtable_socket(socket, address, timeout)
    rescue RuntimeError # Connection failed somehow, again
      false
    end
  end
end