remove useless code

This commit is contained in:
Qwann 2017-04-10 17:47:39 +02:00
parent e0b0a53112
commit be8d249ed7

View file

@ -98,7 +98,6 @@ function kfet_open(init_date, init_status, init_force_close, force_close_url, fo
} }
} }
// SYNCHRONIZATION // SYNCHRONIZATION
websocket_msg_default = {'last_op': 0}
var websocket_protocol = window.location.protocol == 'https:' ? 'wss' : 'ws'; var websocket_protocol = window.location.protocol == 'https:' ? 'wss' : 'ws';
var location_host = window.location.host; var location_host = window.location.host;
@ -106,7 +105,7 @@ function kfet_open(init_date, init_status, init_force_close, force_close_url, fo
var socket = new ReconnectingWebSocket(websocket_protocol+"://" + location_url + "/ws/k-fet/is_open/"); var socket = new ReconnectingWebSocket(websocket_protocol+"://" + location_url + "/ws/k-fet/is_open/");
socket.onmessage = function(e) { socket.onmessage = function(e) {
var data = $.extend({}, websocket_msg_default, JSON.parse(e.data)); var data = JSON.parse(e.data);
if (data['door_action']) { if (data['door_action']) {
console.log("* Message reçu de la part de la porte."); console.log("* Message reçu de la part de la porte.");