Skip to content

Commit

Permalink
miniirc v1.8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
luk3yx committed Aug 22, 2022
1 parent 9213fe2 commit fc920aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 12 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
14 changes: 3 additions & 11 deletions miniirc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit fc920aa

Please sign in to comment.