Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.3.1
-
Fix Version/s: JRuby 1.4
-
Component/s: Core Classes/Modules
-
Labels:None
-
Environment:Linux 2.6.26-2-686, debian lenny, java 1.6.0_12
-
Testcase included:yes
-
Number of attachments :
Description
Timeouts raised by Net::HTTP raise Timeout::ExitException instead of Timeout::Error.
For example:
require 'net/http'
require 'timeout'
begin
http = Net::HTTP.new('www.google.de')
http.open_timeout = 0.01
response = http.start do |h|
h.request_get '/index.html'
end
rescue Exception => e
puts "Got #{e.class}: #{e}"
end
On MRI:
-> Got Timeout::Error: execution expired
On JRuby 1.3.1
-> Got Timeout::ExitException: execution expired
Weird, I wonder how this snuck through various tests for timeout. Fixing...