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

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -