Limnoria/src
Valentin Lorentz 0f1011081e Socket: Fix cascading crash when Socket.run() crashes.
When a driver's run() method crashes, supybot.drivers.run() marks it
as dead and sets its 'irc' attribute to None.

This would be fine for "normal" independent drivers (like Socket used
to be), because this driver would never be called again.

But now that we use select(), some other thread may hold a reference
to this driver in a select() call frame, and call the dead driver's
'_read()' method when there is data to be read from the socket.

There is already a safeguard in '_read()' in the case the socket could
be read from, but this safeguard was missing from _handleSocketError.
This caused the "live" driver's select() to crash, which propagagated
to its run(), which caused the driver to be marked as dead, etc.

Eventually, all drivers could die, and we end up with the dreadful
"Schedule is the only remaining driver, why do we continue to live?"
in an infinite loop.
2021-07-14 23:55:31 +02:00
..
drivers Socket: Fix cascading crash when Socket.run() crashes. 2021-07-14 23:55:31 +02:00
utils utils.str: Rely only on the documented methods of textwrap.TextWrapper. 2021-04-01 20:10:17 +02:00
__init__.py All plugins: set Limnoria contributors as maintainer 2019-11-16 11:41:13 -08:00
ansi.py Change the modeline to use softtabstop instead of tabstop. 2006-02-11 15:52:51 +00:00
callbacks.py Fix a few simple typos (#1476) 2021-06-21 01:07:50 +02:00
cdb.py Remove need for 2to3. 2015-08-11 16:50:23 +02:00
commands.py commands: Add a helpful error message instead of OSError when a subprocess can't be started. 2020-06-20 12:57:15 +02:00
conf.py src/conf.py: fix typo in supybot.reply.error.withNotice 2021-06-26 01:23:36 +02:00
dbi.py core: Apply some suggestions of pyflakes. 2015-08-31 18:19:22 +02:00
dynamicScope.py Continue accelerating the 2to3 step (remove fix_raise). 2014-01-20 15:43:55 +01:00
gpg.py Remove overly complicated code. 2017-09-19 00:34:25 +02:00
httpserver.py httpserver: Hide well-known callback from the index 2021-05-29 11:44:22 +02:00
i18n.py Make getLocaleFromRegistryCache reload existing locales. 2019-11-24 12:59:38 +01:00
ircdb.py Store ignored hostmasks in Expiring HostmaskSet to prevent their pattern cache from expiring too soon 2021-05-30 19:35:05 +02:00
irclib.py irclib: Fix crashes when ERROR is part of a batch. 2021-06-20 23:59:51 +02:00
ircmsgs.py irclib: Fix overhead computation by using the real target computation algo 2021-06-08 21:56:08 +02:00
ircutils.py Actually parse weird hostmasks like RFC1459 recommends 2021-07-14 23:43:11 +02:00
log.py ircutils: Improve robustness when faced with invalid hostmasks 2021-07-14 23:25:11 +02:00
plugin.py Log loading times for each plugin 2021-04-11 16:35:42 +02:00
plugins Add a symlink supybot pointing to src/ + move locales/ to src/ 2019-01-02 14:29:32 +01:00
questions.py core: Apply some suggestions of pyflakes. 2015-08-31 18:19:22 +02:00
registry.py Fix a few simple typos (#1476) 2021-06-21 01:07:50 +02:00
schedule.py Scheduler: Preserve period offset on restarts. 2020-05-02 18:28:41 +02:00
setup.py src/setup: Add support for ReST readmes by default 2021-04-11 10:38:05 +02:00
shlex.py Remove need for 2to3. 2015-08-11 16:50:23 +02:00
test.py tests: Pass setUp arguments 2021-04-24 21:03:48 +02:00
unpreserve.py Revert "Deduplicate (de)serialization code shared by UsersDictionary and ChannelsDictionary." 2019-09-28 10:33:10 +02:00
world.py Apply STS policies when connecting to a server. 2020-05-01 19:46:19 +02:00