You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

timeout_fixes.rb 448B

12345678910111213141516171819202122
  1. # frozen_string_literal: true
  2. # http://trac.openidenabled.com/trac/ticket/156
  3. module OpenID
  4. @@timeout_threshold = 20
  5. def self.timeout_threshold
  6. @@timeout_threshold
  7. end
  8. def self.timeout_threshold=(value)
  9. @@timeout_threshold = value
  10. end
  11. class StandardFetcher
  12. def make_http(uri)
  13. http = @proxy.new(uri.host, uri.port)
  14. http.read_timeout = http.open_timeout = OpenID.timeout_threshold
  15. http
  16. end
  17. end
  18. end