mirror of
https://github.com/CopterExpress/clever-show.git
synced 2026-06-02 18:19:33 +00:00
Server: Check if self.clients list is not empty when trying to pop element from it
This commit is contained in:
@@ -310,8 +310,8 @@ class Client(messaging.ConnectionManager):
|
||||
def remove(self):
|
||||
if self.connected:
|
||||
self.close()
|
||||
|
||||
self.clients.pop(self.addr[0])
|
||||
if self.clients:
|
||||
self.clients.pop(self.addr[0])
|
||||
logging.info("Client {} successfully removed!".format(self.copter_id))
|
||||
|
||||
@requires_connect
|
||||
|
||||
Reference in New Issue
Block a user