docs: def onClose(self, was_clean, code, reason):
          """
          Called when a client closes a websocket connection
          """
          logger.debug("Connection closed ({peer})".format(peer=self.peer))
  
          # Publish ON_CLOSE message
          self.factory.mease.publisher.publish(
              message_type=ON_CLOSE, client_id=self._client_id, client_storage=self.storage)
  
          self.factory.remove_client(self)