def disconnect(self, session):
        """
        Called from portal when the connection is closed from the
        portal side.

        Args:
            session (PortalSession): Session to disconnect.

        """
        global _CONNECTION_QUEUE
        if session in _CONNECTION_QUEUE:
            # connection was already dropped before we had time
            # to forward this to the Server, so now we just remove it.
            _CONNECTION_QUEUE.remove(session)
            return
        self.portal.amp_protocol.send_AdminPortal2Server(session,
                                                         operation=PDISCONN)
dataset/ETHPy150Open evennia/evennia/evennia/server/portal/portalsessionhandler.py/PortalSessionHandler.disconnect/original