Socket: Don't add instances twice in cls._instances.

The connect() method already adds it, so it was in the list twice
(added both by __init__() and connect()).

This caused _select() to call _read() twice on the same instance,
except there is usually nothing to read on the second call,
so it blocks for up to conf.supybot.drivers.poll().
This commit is contained in:
Valentin Lorentz 2020-01-25 21:00:42 +01:00
parent b5beb5f981
commit 5efd2afa27

View File

@ -65,7 +65,6 @@ class SocketDriver(drivers.IrcDriver, drivers.ServersMixin):
_instances = []
_selecting = threading.Lock()
def __init__(self, irc):
self._instances.append(self)
assert irc is not None
self.irc = irc
drivers.IrcDriver.__init__(self, irc)