Log f.exception() if present instead of "Stopped".

This commit is contained in:
Jonathan Moody 2022-09-20 08:10:38 -05:00 committed by Lex Berezhny
parent 137ebd503d
commit c88f0797a3

View file

@ -101,11 +101,13 @@ class WalletServerPayer:
def _done_callback(self, f):
if f.cancelled():
reason = "Cancelled"
elif f.exception():
reason = f'Exception: {f.exception()}'
elif not self.running:
reason = "Stopped"
else:
reason = f'Exception: {f.exception()}'
log.info("Stopping wallet server payments. %s", reason)
reason = ""
log.warning("Stopping wallet server payments. %s", reason)
async def stop(self):
if self.running: