def connect(self, session):
        """
        Called by protocol at first connect. This adds a not-yet
        authenticated session using an ever-increasing counter for
        sessid.

        Args:
            session (PortalSession): The Session connecting.

        Notes:
            We implement a throttling mechanism here to limit the speed at
            which new connections are accepted - this is both a stop
            against DoS attacks as well as helps using the Dummyrunner
            tester with a large number of connector dummies.

        """
        global _CONNECTION_QUEUE

        if session:
            # assign if we are first-connectors
            self.latest_sessid += 1
            session.sessid = self.latest_sessid
            session.server_connected = False
            _CONNECTION_QUEUE.appendleft(session)
            if len(_CONNECTION_QUEUE) > 1:
                session.data_out("%s DoS protection is active. You are queued to connect in %g seconds ..." % (
                                 settings.SERVERNAME,
                                 len(_CONNECTION_QUEUE)*_MIN_TIME_BETWEEN_CONNECTS))
        now = time()
        if (self.connection_last - now < _MIN_TIME_BETWEEN_CONNECTS) or not self.portal.amp_protocol:
            if not session or not self.connection_task:
                self.connection_task = reactor.callLater(_MIN_TIME_BETWEEN_CONNECTS, self.connect, None)
            self.connection_last = now
            return
        elif not session:
            if _CONNECTION_QUEUE:
                # keep launching tasks until queue is empty
                self.connection_task = reactor.callLater(_MIN_TIME_BETWEEN_CONNECTS, self.connect, None)
            else:
                self.connection_task = None
        self.connection_last = now

        if _CONNECTION_QUEUE:
            # sync with server-side
            session = _CONNECTION_QUEUE.pop()
            sessdata = session.get_sync_data()

            self[session.sessid] = session
            session.server_connected = True
            self.portal.amp_protocol.send_AdminPortal2Server(session,
                                                             operation=PCONN,
                                                             sessiondata=sessdata)
dataset/ETHPy150Open evennia/evennia/evennia/server/portal/portalsessionhandler.py/PortalSessionHandler.connect/swapped operands of `-`