From 0d51e2e2899e5fb5c1299a5866a64ab30e38fca1 Mon Sep 17 00:00:00 2001 From: Dario Del Piano Date: Thu, 4 Jun 2020 12:57:33 +0100 Subject: [PATCH] fixed reconnection_error status, adding timeout before the reload to display the message to the user --- components/VFBMain.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/components/VFBMain.js b/components/VFBMain.js index 458921346..9d7489ae4 100644 --- a/components/VFBMain.js +++ b/components/VFBMain.js @@ -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'); }