summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
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 " +