Fixing client disconnection reporting.

This commit is contained in:
Marat Fayzullin 2024-08-13 12:42:42 -04:00
parent ecb7ab75e7
commit 4a78499b70
1 changed files with 1 additions and 2 deletions

View File

@ -58,7 +58,6 @@ class ClientRegistry(object):
return len(self.clients)
def removeClient(self, client):
self.reportClient(client, { "state":"Disconnected" })
try:
if client in self.chat:
del self.chat[client]
@ -66,7 +65,7 @@ class ClientRegistry(object):
except ValueError:
pass
self.broadcast()
self.reportClient(client, False)
self.reportClient(client, { "state":"Disconnected" })
def _checkClientCount(self, new_count):
for client in self.clients[new_count:]: