summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-04-07 09:45:00 -0400
committerPliable Pixels <pliablepixels@gmail.com>2018-04-07 09:45:00 -0400
commit85b06277f844384f1dbd3da1534a01284a94cce1 (patch)
tree5e5b1ffbcd5f033bc08317e4a8a5d42c0db2eb57 /www
parentcd288815b86633aacede62ad8f177799332e4b5a (diff)
#604 force terminate if odd error on websocket init received
Diffstat (limited to 'www')
-rw-r--r--www/js/EventServer.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/www/js/EventServer.js b/www/js/EventServer.js
index 489a96c7..ceef3629 100644
--- a/www/js/EventServer.js
+++ b/www/js/EventServer.js
@@ -116,9 +116,10 @@ angular.module('zmApp.controllers')
// console.log ("WS="+JSON.stringify(ws));
if (typeof ws !== 'undefined')
{
- NVRDataModel.debug("websocket already initialized ?!?");
- d.resolve("true");
- return d.promise;
+ NVRDataModel.debug("websocket already initialized -- thats not right.Forcing close");
+ ws.close(true);
+ ws=undefined;
+
}
NVRDataModel.log("Initializing Websocket with URL " +