Now hides UI when socket connection is lost
This commit is contained in:
parent
babfa22ff8
commit
97cabd592b
@ -161,6 +161,10 @@ export default class Overlay extends Component {
|
|||||||
socketAddress = (socketAddress === undefined ? 'ws://localhost' : `ws://${socketAddress}`) + ":6557/socket";
|
socketAddress = (socketAddress === undefined ? 'ws://localhost' : `ws://${socketAddress}`) + ":6557/socket";
|
||||||
if (this.state.isConnectedToSocket) return;
|
if (this.state.isConnectedToSocket) return;
|
||||||
|
|
||||||
|
if (this.state.isVisible) {
|
||||||
|
this.resetData(false);
|
||||||
|
}
|
||||||
|
|
||||||
console.log(`Connecting to ${socketAddress}`);
|
console.log(`Connecting to ${socketAddress}`);
|
||||||
const socket = new WebSocket(socketAddress);
|
const socket = new WebSocket(socketAddress);
|
||||||
socket.addEventListener('open', () => {
|
socket.addEventListener('open', () => {
|
||||||
|
Reference in New Issue
Block a user