api - Ruby Net::Http never times out -


i've got code parse web api,

def parse(uri)     http = net::http.new(uri.host, uri.port)     http.use_ssl = true     http.open_timeout = 3     http.ssl_timeout = 3     http.read_timeout = 3     http.verify_mode = openssl::ssl::verify_none      request = net::http::get.new(uri.request_uri)     request.basic_auth("viewer", "viewer")      response = http.request(request) end 

but either i'm missing timeout or ruby ignoring timeouts. when hits network issue script never finishes , hangs forever.

ideas?


Comments

Popular posts from this blog

c# - OpenXML hanging while writing elements -

php - regexp cyrillic filename not matches -

java - IntelliJ - No such instance method -