diff options
| author | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-07 09:45:00 -0400 |
|---|---|---|
| committer | Pliable Pixels <pliablepixels@gmail.com> | 2018-04-07 09:45:00 -0400 |
| commit | 85b06277f844384f1dbd3da1534a01284a94cce1 (patch) | |
| tree | 5e5b1ffbcd5f033bc08317e4a8a5d42c0db2eb57 /www/js | |
| parent | cd288815b86633aacede62ad8f177799332e4b5a (diff) | |
#604 force terminate if odd error on websocket init received
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/EventServer.js | 7 |
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 " + |
