class HTTP::Timeout::Global

def connect_ssl

def connect_ssl
  reset_timer
  begin
    @socket.connect_nonblock
  rescue IO::WaitReadable
    wait_readable_or_timeout
    retry
  rescue IO::WaitWritable
    wait_writable_or_timeout
    retry
  end
end