code: def disconnected(self, client):
          
          if client not in self.clients:
              # already disconnected.
              return
          self.clients.remove(client)
          self._log_disconnected(client)
          self._close(client)
docs: Call this method when a client disconnected.