@smartface/smartface.emulator
Advanced tools
Comparing version
@@ -281,5 +281,9 @@ var SMFC_WS; | ||
var ws = new WebSocket(ws_url); | ||
var timer = null; | ||
ws.onopen = function() { | ||
console.log('ws connected'); | ||
SMFC_WS = ws; | ||
timer = setInterval(function() { | ||
ws.send("{\"command\":\"keepAlive\"}"); | ||
}, 15000); | ||
}; | ||
@@ -290,2 +294,4 @@ ws.onerror = function(e) { | ||
ws.onclose = function(e) { | ||
if (timer) | ||
clearInterval(timer); | ||
console.log('ws closed', e); | ||
@@ -292,0 +298,0 @@ }; |
{ | ||
"name": "@smartface/smartface.emulator", | ||
"version": "0.0.5", | ||
"version": "0.0.6", | ||
"description": "SmartfaceCloud Emulator", | ||
@@ -5,0 +5,0 @@ "main": "main.js", |
81315
0.2%392
1.55%