summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorPliable Pixels <pliablepixels@gmail.com>2018-12-05 09:35:25 -0800
committerPliable Pixels <pliablepixels@gmail.com>2018-12-05 09:35:25 -0800
commitc2879acf9b6ec3ee289b6117bb60c99136be439b (patch)
treea06981d944a3620e4d6ecd00d872c35f8caa8668 /www
parent4f99a537a0e5f4dac2860d06910b928d050e2993 (diff)
#755 fix ES crash
Diffstat (limited to 'www')
-rw-r--r--www/js/EventServer.js8
1 files changed, 6 insertions, 2 deletions
diff --git a/www/js/EventServer.js b/www/js/EventServer.js
index 5ef0a260..90d52951 100644
--- a/www/js/EventServer.js
+++ b/www/js/EventServer.js
@@ -344,9 +344,13 @@ angular.module('zmApp.controllers')
ws = undefined;
} else {
if (nativeWebSocketId != -1) //native;
- iClosed = true;
+ {
+ NVRDataModel.debug ("Closing native websocket as websocket = "+nativeWebSocketId);
+ iClosed = true;
CordovaWebsocketPlugin.wsClose(nativeWebSocketId, 1000, "Connection closed");
- nativeWebSocketId = -1;
+ nativeWebSocketId = -1;
+ }
+
}