Browse Source

fix js ping

main
Hendrik Langer 4 years ago
parent
commit
cae10c1804
  1. 6
      raspberry/roberto/views/frontend/templates/index.html

6
raspberry/roberto/views/frontend/templates/index.html

@ -229,7 +229,11 @@ setInterval(function(){
if (socket.connected) { if (socket.connected) {
socket.emit('ping_message', { "type": "ping" }); socket.emit('ping_message', { "type": "ping" });
} }
}, 5000); }, 10000);
socket.on('ping_message', (data) => {
console.log('ping received: ',data);
});
</script> </script>

Loading…
Cancel
Save