From fc920aa33058d3dcd65b7a91c1f2581a9881e98f Mon Sep 17 00:00:00 2001 From: luk3yx Date: Mon, 22 Aug 2022 17:11:42 +1200 Subject: [PATCH] miniirc v1.8.3 --- CHANGELOG.md | 3 ++- miniirc.py | 14 +++----------- 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 309004c..ed96a10 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,8 @@ Notes: ### Changed - Receiving from the SSL socket is now done with a lock to prevent sending and - receiving at the same time (which can break with SSL). + receiving at the same time (which can break with SSL). This should fix + random disconnects with Ubuntu 22.04 / OpenSSL 3. - Because of the above change, `irc.sock` is now non-blocking and things that call `irc.sock.settimeout()` may be broken. diff --git a/miniirc.py b/miniirc.py index 0fcb1a2..541902a 100755 --- a/miniirc.py +++ b/miniirc.py @@ -8,9 +8,9 @@ import atexit, errno, threading, time, select, socket, ssl, sys, warnings # The version string and tuple -ver = __version_info__ = (1,8,2) -version = 'miniirc IRC framework v1.8.2' -__version__ = '1.8.2' +ver = __version_info__ = (1,8,3) +version = 'miniirc IRC framework v1.8.3' +__version__ = '1.8.3' # __all__ and _default_caps __all__ = ['CmdHandler', 'Handler', 'IRC'] @@ -500,14 +500,6 @@ def _main(self): except ssl.SSLWantWriteError: select.select((), (self.sock,), (self.sock,), self.ping_timeout or self.ping_interval) - except socket.error as e: - if e.errno != errno.EWOULDBLOCK: - raise - - logger.warning('Running irc.sock.settimeout is not ' - 'supported and will break on some ' - 'Python/OpenSSL versions.') - self.sock.setblocking(False) except (OSError, socket.error) as e: self.debug('Lost connection!', repr(e))