3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-11-01 01:09:22 +01:00

core: demote KeyError logging in _remove_client to DEBUG

This is needed for #607.
This commit is contained in:
James Lu 2018-05-21 00:28:16 -07:00
parent c9c937e7a7
commit a66a9b6336

View File

@ -598,13 +598,14 @@ class PyLinkNetworkCore(structures.CamelCaseToSnakeCase):
del self.channels[c] del self.channels[c]
sid = self.get_server(numeric) sid = self.get_server(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) 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.debug('(%s) Skipping removing client %s that no longer exists', self.name, numeric,
self.name, numeric, exc_info=True) exc_info=True)
else:
log.debug('(%s) Removing client %s from user + server state', self.name, numeric)
## State checking functions ## State checking functions
def nick_to_uid(self, nick): def nick_to_uid(self, nick):