Fix BackOffLoopingCall error so it is not misleading

The backoff looping call logging was previously making
a decision on if timeout had or was going to be exceeded
by including idle time and it's internal time, however
this is misleading as the overall operation may take
30 seconds externally, a user initiated timeout of 30
seconds is requested, and the error might say something
like 18 seconds has passed, when that is incorrect.

The logic is actualy correct, the logging was just
misleading.

Fixes the exception message to use the total time.

Change-Id: Ie9ef5a53abb24f6ab7de0ad57a672c0a8d7ff0ee
This commit is contained in:
Julia Kreger 2021-09-16 10:14:34 -07:00
parent fcdeb4a1b6
commit d3ee8ef00a
1 changed files with 1 additions and 1 deletions

View File

@ -348,7 +348,7 @@ class BackOffLoopingCall(LoopingCallBase):
if timeout > 0 and self._error_time + idle > timeout:
raise LoopingCallTimeOut(
_('Looping call timed out after %.02f seconds')
% self._error_time)
% (self._error_time + idle))
self._error_time += idle
return idle