def _receive_messages(self) -> bytes:
try:
data = self._irc.recv(self._BYTE_READ)
- except ConnectionError as e:
+ except OSError as e:
logger.exception(e)
self._restart_connection()
return b""
message += data
if self._AUTH_SUCC % {b"nick": self._nick} in message:
logger.info("Connection with %s authenticated", self._nick)
- self.disconnect()
return True
elif self._AUTH_BAD_FORMAT in message:
logger.critical(
logger.critical("Connection with %s timed out with: %s", self._nick, message)
return False
- def get_messagess(self) -> list[Message]:
+ def get_messages(self) -> list[Message]:
messages: list[Message] = []
data = self._receive_messages()
if not data: