Catch an IOError that happens on Ruby 2.0

Would get a #<IOError: closed stream> error on Ruby 2.0
This commit is contained in:
John Chow 2014-03-01 13:12:48 -08:00
parent 13ac1c85f3
commit d67df1bb77

View File

@ -45,7 +45,7 @@ module Rack
begin
http.send_request('GET', uri.path)
@use_vendored = false
rescue ::Timeout::Error, Errno::ECONNREFUSED, EOFError
rescue ::Timeout::Error, Errno::ECONNREFUSED, EOFError, IOError
@use_vendored = true
rescue => e
$stderr.puts e.inspect