More robust daemon error handling

Fixes #6
This commit is contained in:
Neil Booth 2016-11-10 23:26:11 +09:00
parent 8188f7e909
commit c6b5c577ab

View File

@ -91,6 +91,10 @@ class Daemon(util.LoggedClass):
msg = 'connection problem - is your daemon running?'
except DaemonWarmingUpError:
msg = 'still starting up checking blocks...'
except (asyncio.CancelledError, DaemonError):
raise
except Exception as e:
msg = ('request gave unexpected error: {}'.format(e))
if msg != prior_msg or count == 10:
self.logger.error('{}. Retrying between sleeps...'