Add timeouts to the retry category, helps with the nexpose instance is heavily loaded
git-svn-id: file:///home/svn/framework3/trunk@9604 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
48732165f3
commit
9c0bcb4bad
|
@ -140,7 +140,13 @@ class APIRequest
|
|||
@conn_tries += 1
|
||||
retry
|
||||
end
|
||||
rescue ::Timeout::Error, ::Errno::EHOSTUNREACH,::Errno::ENETDOWN,::Errno::ENETUNREACH,::Errno::ENETRESET,::Errno::EHOSTDOWN,::Errno::EACCES,::Errno::EINVAL,::Errno::EADDRNOTAVAIL
|
||||
rescue ::Timeout::Error
|
||||
if @conn_tries < 5
|
||||
@conn_tries += 1
|
||||
retry
|
||||
end
|
||||
@error = "NeXpose host did not respond"
|
||||
rescue ::Errno::EHOSTUNREACH,::Errno::ENETDOWN,::Errno::ENETUNREACH,::Errno::ENETRESET,::Errno::EHOSTDOWN,::Errno::EACCES,::Errno::EINVAL,::Errno::EADDRNOTAVAIL
|
||||
@error = "NeXpose host is unreachable"
|
||||
# Handle console-level interrupts
|
||||
rescue ::Interrupt
|
||||
|
|
Loading…
Reference in New Issue