1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

bust connection cache on connection errors

This commit is contained in:
Wesley Beary 2009-10-26 17:53:23 -07:00
parent 1d5b3d19d3
commit 8ef154b1ab

View file

@ -35,6 +35,7 @@ unless Fog.mocking?
end
def request(params)
begin
params[:path] ||= ''
unless params[:path][0..0] == '/'
params[:path] = '/' + params[:path].to_s
@ -130,6 +131,10 @@ unless Fog.mocking?
response.body = body
end
end
rescue => connection_error
@connection = nil
raise(connection_error)
end
if error
raise(Fog::Errors.status_error(params[:expects], response.status, response))