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): def _done_callback(self, f):
if f.cancelled(): if f.cancelled():
reason = "Cancelled" reason = "Cancelled"
elif f.exception():
reason = f'Exception: {f.exception()}'
elif not self.running: elif not self.running:
reason = "Stopped" reason = "Stopped"
else: else:
reason = f'Exception: {f.exception()}' reason = ""
log.info("Stopping wallet server payments. %s", reason) log.warning("Stopping wallet server payments. %s", reason)
async def stop(self): async def stop(self):
if self.running: if self.running: