From 2d81c923a96ed66e9a268a923bb606d1a432df9a Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Mon, 19 Feb 2018 07:45:04 +0000 Subject: [PATCH] Disconnect on error --- webapp/titanembeds/blueprints/gateway/gateway.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/webapp/titanembeds/blueprints/gateway/gateway.py b/webapp/titanembeds/blueprints/gateway/gateway.py index 815ce78..fb9d383 100644 --- a/webapp/titanembeds/blueprints/gateway/gateway.py +++ b/webapp/titanembeds/blueprints/gateway/gateway.py @@ -11,6 +11,9 @@ class Gateway(Namespace): db.session.commit() db.session.remove() + def on_error(self): + disconnect() + def on_connect(self): emit('hello')