From ca09254adabe4944cd2492275405e973118daf30 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Sat, 3 Nov 2018 03:14:42 +0000 Subject: [PATCH] Time sleep 1 in heartbeat --- webapp/titanembeds/blueprints/gateway/gateway.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/webapp/titanembeds/blueprints/gateway/gateway.py b/webapp/titanembeds/blueprints/gateway/gateway.py index 6c5f2c2..19cf2ca 100644 --- a/webapp/titanembeds/blueprints/gateway/gateway.py +++ b/webapp/titanembeds/blueprints/gateway/gateway.py @@ -78,18 +78,21 @@ class Gateway(Namespace): if not visitor_mode: key = None if "unauthenticated" not in session: + self.teardown_db_session() disconnect() if session["unauthenticated"]: key = session["user_keys"][guild_id] status = update_user_status(guild_id, session["username"], key) if status["revoked"] or status["banned"]: emit("revoke") - time.sleep(1000) + self.teardown_db_session() + time.sleep(1) disconnect() else: emit("ack") else: if not guild_accepts_visitors(guild_id): + self.teardown_db_session() disconnect() self.teardown_db_session()