mirror of
https://github.com/ceph/ceph
synced 2025-01-28 22:14:02 +00:00
safe_while: Don't sleep() on the first attempt
This was causing unnecessary delays in several places Signed-off-by: Zack Cerza <zack.cerza@inktank.com>
This commit is contained in:
parent
e323392778
commit
fc94879498
@ -119,6 +119,8 @@ class safe_while(object):
|
||||
|
||||
def __call__(self):
|
||||
self.counter += 1
|
||||
if self.counter == 1:
|
||||
return True
|
||||
if self.counter > self.tries:
|
||||
error_msg = self._make_error_msg()
|
||||
if self._raise:
|
||||
|
Loading…
Reference in New Issue
Block a user