Actions
Bug #18375
closedTimeout.timeout(sec, klass: MyExceptionClass) can not retry correctly.
Description
Following is a example for describe this issue.
class DelayError < Exception
end
Timeout.timeout(2, DelayError) do |arg|
puts 'start'
sleep 10
rescue DelayError
puts '*'*10
retry
end
Will output
start
**********
start
What i expected is:
start
**********
start
**********
start
**********
...
Basically, what i expected equivalent is:
begin
Timeout.timeout(2) do |arg|
puts 'start'
sleep 10
end
rescue TimeoutError
puts '*'*10
retry
end
Actions
Like0
Like0Like0Like0