Skip to content

Commit

Permalink
fix: ambiguity in client termination handler (#26)
Browse files Browse the repository at this point in the history
`client/bot` could get closed for various of reasons like some openssl
error. So, this pr fixes this and add explicit logging for client
termination on Exceptions.
  • Loading branch information
KnownBlackHat authored Sep 22, 2024
1 parent a8ea296 commit b1d9746
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions mr_robot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ async def main():
await future
except asyncio.CancelledError:
logger.info("Received signal to terminate bot and event loop")
except Exception as e:
logger.info(f"Client got closed due to: {e}")
finally:
logger.warning("Closing Client")
if not client.is_closed():
Expand Down

0 comments on commit b1d9746

Please sign in to comment.