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:
parent
1d5b3d19d3
commit
8ef154b1ab
1 changed files with 86 additions and 81 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue