bofh69 / AiLight

This fork of AiLight sets the lamp's colour from a weather station.
Other
0 stars 0 forks source link

The web socket connection is not reliable. #1

Closed bofh69 closed 6 years ago

bofh69 commented 6 years ago

If the web socket connection goes down, nothing will reconnect it again.

These calls: websock.send(JSON.stringify(msg)); should be changed into a function call where the websock's state is checked and it should try to reconnect the socket before sending the message. Perhaps queue the latest message so it can be sent after connection?

Have a html message displaying a message about not being connected to the server.