From f9ef4569f42b13aa5801841039287a70e6766324 Mon Sep 17 00:00:00 2001 From: Jeremy Zhang Date: Wed, 30 Oct 2019 22:23:05 -0700 Subject: [PATCH] Reconnect to gateway after disconnect --- webapp/titanembeds/static/js/embed.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webapp/titanembeds/static/js/embed.js b/webapp/titanembeds/static/js/embed.js index e17093e..1215b7b 100644 --- a/webapp/titanembeds/static/js/embed.js +++ b/webapp/titanembeds/static/js/embed.js @@ -2132,7 +2132,12 @@ }); socket.on("disconnect", function () { - + setTimeout(function () { + if (soccket) { + soccket = null; + initiate_websockets(); + } + }, 500); }); socket.on("revoke", function () {