def flush(self):
        if self.handler is None:
            return

        if not self.send_queue:
            return

        self.handler.send_messages(self.send_queue)

        self.send_queue = []

        # If session was closed, detach connection
        if self.is_closed and self.handler is not None:
            self.handler.session_closed()

    # Close connection with all endpoints or just one endpoint
Check that a mismatched HTTP status code still returns the
dataset/ETHPy150Open mrjoes/tornadio2/tornadio2/session.py/Session.flush--crossover with--dataset/ETHPy150Open photo/openphoto-python/tests/unit/test_http_errors.py/TestHttpErrors.test_with_status_code_mismatch