parent
f3166176ce
commit
6f43910f2d
@ -116,7 +116,7 @@ class Daemon(object):
|
||||
nonlocal last_error_log, retry
|
||||
now = time.time()
|
||||
if now - last_error_log > 60:
|
||||
last_error_time = now
|
||||
last_error_log = now
|
||||
self.logger.error(f'{error} Retrying occasionally...')
|
||||
if retry == self.max_retry and self.failover():
|
||||
retry = 0
|
||||
|
||||
@ -487,6 +487,6 @@ async def test_failover(daemon, caplog):
|
||||
with ClientSessionFailover(('getblockcount', [], height)):
|
||||
await daemon.height() == height
|
||||
|
||||
assert in_caplog(caplog, "disconnected", 3)
|
||||
assert in_caplog(caplog, "disconnected", 1)
|
||||
assert in_caplog(caplog, "failing over")
|
||||
assert in_caplog(caplog, "connection restored")
|
||||
|
||||
Loading…
Reference in New Issue
Block a user