Update SystemEventHandler.js

This commit is contained in:
Luis Fernando Molina committed 2020-04-06 06:46:07 +02:00
1 parent d8427ace71
commit 600b2da179
1 file changed
+1 -4
+1 -4
View File
@@ -71,7 +71,7 @@ function newSystemEventHandler () {
commandsWaitingConfirmation.set(stringNonce, command)
commandsSentByTimestamp.set(stringNonce, timestamp)
let messageToWebSocketServer = stringNonce + '->' + JSON.stringify(command)
let messageToWebSocketServer = 'Web Browser|' + stringNonce + '|' + JSON.stringify(command)
WEB_SOCKETS_CONNECTION.send(messageToWebSocketServer)
}
@@ -164,9 +164,6 @@ function newSystemEventHandler () {
function setuptWebSockets (callBackFunction) {
try {
WEB_SOCKETS_CONNECTION = new WebSocket(WEB_SOCKETS_URL)
WEB_SOCKETS_CONNECTION.onopen = () => {
console.log('Websocket connection opened.')
}
WEB_SOCKETS_CONNECTION.onerror = error => {
console.log('WebSocket error:' + JSON.stringify(error))
}