Now hides UI when socket connection is lost

This commit is contained in:
Liam 2022-10-14 12:46:16 +01:00
parent babfa22ff8
commit 97cabd592b

@ -161,6 +161,10 @@ export default class Overlay extends Component {
socketAddress = (socketAddress === undefined ? 'ws://localhost' : `ws://${socketAddress}`) + ":6557/socket";
if (this.state.isConnectedToSocket) return;
if (this.state.isVisible) {
this.resetData(false);
}
console.log(`Connecting to ${socketAddress}`);
const socket = new WebSocket(socketAddress);
socket.addEventListener('open', () => {