Skip to content

Commit

Permalink
fixed reconnection_error status, adding timeout before the reload to …
Browse files Browse the repository at this point in the history
…display the message to the user
  • Loading branch information
ddelpiano committed Jun 4, 2020
1 parent 1fcd3cc commit 0d51e2e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion components/VFBMain.js
Original file line number Diff line number Diff line change
Expand Up @@ -1178,7 +1178,10 @@ export default class VFBMain extends React.Component {
if (GEPPETTO.MessageSocket.socketStatus === GEPPETTO.Resources.SocketStatus.CLOSE) {
window.ga('vfb.send', 'event', 'reload', 'websocket-disconnect', (window.location.pathname + window.location.search));
console.log("Reloading websocket connection by reloading page");
window.location.reload(true);

setTimeout(() => {
window.location.reload(true);
}, 5000);
} else {
console.log("%c Websocket reconnection in progress... ", 'background: #444; color: #bada55');
}
Expand Down

0 comments on commit 0d51e2e

Please sign in to comment.