

def mode_close(self, request):
    '\n        This is called by render_POST when the client is signalling\n        that it is about to be closed.\n\n        Args:\n            request (Request): Incoming request.\n\n        '
    suid = request.args.get('suid', ['0'])[0]
    if (suid == '0'):
        self.client_disconnect(suid)
    else:
        try:
            sess = self.sessionhandler.session_from_suid(suid)[0]
            sess.sessionhandler.disconnect(sess)
        except IndexError:
            self.client_disconnect(suid)
            pass
    return ''

dataset/ETHPy150Open evennia/evennia/evennia/server/portal/webclient.py WebClient.mode_close/original