def remove_handler(self, handler):
        # Attempt to remove another handler
        if self.handler != handler:
            raise Exception('Attempted to remove invalid handler')

        self.handler = None
        self.promote()

        self.server.stats.connection_closed()
Remove active handler from the session
dataset/ETHPy150Open mrjoes/tornadio2/tornadio2/session.py/Session.remove_handler