Lower message severity when retrying invoke the first time

This commit is contained in:
Lonami Exo 2018-03-07 11:13:55 +01:00
parent dd6802e032
commit d0bdb7ea3f

View File

@ -450,9 +450,10 @@ class TelegramBareClient:
if result is not None: if result is not None:
return result return result
__log__.warning('Invoking %s failed %d times, ' log = __log__.info if retry == 0 else __log__.warning
'reconnecting and retrying', log('Invoking %s failed %d times, connecting again and retrying',
[str(x) for x in requests], retry + 1) [str(x) for x in requests], retry + 1)
sleep(1) sleep(1)
# The ReadThread has priority when attempting reconnection, # The ReadThread has priority when attempting reconnection,
# since this thread is constantly running while __call__ is # since this thread is constantly running while __call__ is