From efbb360e4819aa87e5fdad34781bdcf3df73979b Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Sun, 11 Oct 2020 00:26:21 +0000 Subject: [PATCH] More debug logging on IRCClient --- irclog.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/irclog.py b/irclog.py index e476d69..e944281 100644 --- a/irclog.py +++ b/irclog.py @@ -577,11 +577,15 @@ class IRCClient: while True: connectionClosedEvent.clear() try: + self.logger.debug('Creating IRC connection') self._transport, self._protocol = await loop.create_connection(lambda: IRCClientProtocol(self.messageQueue, connectionClosedEvent, loop, self.config, self.channels), self.config['irc']['host'], self.config['irc']['port'], ssl = self._get_ssl_context()) + self.logger.debug('Waiting for connection closure or SIGINT') try: await asyncio.wait((connectionClosedEvent.wait(), sigintEvent.wait()), return_when = asyncio.FIRST_COMPLETED) finally: + self.logger.debug(f'Got connection closed {connectionClosedEvent.is_set()} / SIGINT {sigintEvent.is_set()}') if not connectionClosedEvent.is_set(): + self.logger.debug('Quitting connection') await self._protocol.quit() except (ConnectionRefusedError, ssl.SSLError, asyncio.TimeoutError) as e: self.logger.error(str(e))