mirror of
https://github.com/jlu5/PyLink.git
synced 2025-01-26 04:04:22 +01:00
classes: really fix KeyError crashes on duplicate QUIT
This commit is contained in:
parent
8eba402a33
commit
b46ab844fe
@ -589,14 +589,13 @@ class PyLinkNetworkCore(structures.CamelCaseToSnakeCase):
|
|||||||
del self.channels[c]
|
del self.channels[c]
|
||||||
|
|
||||||
sid = self.get_server(numeric)
|
sid = self.get_server(numeric)
|
||||||
log.debug('Removing client %s from self.users', numeric)
|
log.debug('(%s) Removing client %s from users index', self.name, numeric)
|
||||||
try:
|
try:
|
||||||
del self.users[numeric]
|
del self.users[numeric]
|
||||||
|
self.servers[sid].users.discard(numeric)
|
||||||
except KeyError:
|
except KeyError:
|
||||||
log.warning('(%s) Failed to remove %r from users index - possible desync or timing issue? (stray QUIT after KILL)',
|
log.warning('(%s) Failed to remove %r from users index - possible desync or timing issue? (stray QUIT after KILL)',
|
||||||
self.name, numeric, exc_info=True)
|
self.name, numeric, exc_info=True)
|
||||||
log.debug('Removing client %s from self.servers[%s].users', numeric, sid)
|
|
||||||
self.servers[sid].users.discard(numeric)
|
|
||||||
|
|
||||||
## State checking functions
|
## State checking functions
|
||||||
def nick_to_uid(self, nick):
|
def nick_to_uid(self, nick):
|
||||||
|
Loading…
Reference in New Issue
Block a user