Method: Bundler::Settings::TCPSocketProbe#replies?

Defined in:
lib/bundler/mirror.rb

#replies?(mirror) ⇒ Boolean

Returns:

  • (Boolean)


149
150
151
152
153
154
155
156
157
# File 'lib/bundler/mirror.rb', line 149

def replies?(mirror)
  MirrorSockets.new(mirror).any? do |socket, address, timeout|
    socket.connect_nonblock(address)
  rescue Errno::EINPROGRESS
    wait_for_writtable_socket(socket, address, timeout)
  rescue RuntimeError # Connection failed somehow, again
    false
  end
end