move the instance_eval(&block) to the bottom, so state gets refreshed at least once ... stale state == bad
This commit is contained in:
parent
035ead02c0
commit
4ca08fea11
|
@ -111,13 +111,10 @@ module Fog
|
|||
|
||||
def wait_for(timeout = 600, &block)
|
||||
start = Time.now
|
||||
until instance_eval(&block)
|
||||
if Time.now - start > timeout
|
||||
break
|
||||
end
|
||||
begin
|
||||
reload
|
||||
sleep(1)
|
||||
end
|
||||
end until instance_eval(&block) || Time.now - start > timeout
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue