From ccb5af08fa7511e9dd70ce3f2a9a833b2cf29941 Mon Sep 17 00:00:00 2001 From: Samuele Locatelli Date: Mon, 4 Mar 2024 17:00:43 +0100 Subject: [PATCH] Altro metodo reload 1 sola volta --- MP.Mon/Pages/_Layout.cshtml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/MP.Mon/Pages/_Layout.cshtml b/MP.Mon/Pages/_Layout.cshtml index 53fd2406..cc1b5170 100644 --- a/MP.Mon/Pages/_Layout.cshtml +++ b/MP.Mon/Pages/_Layout.cshtml @@ -66,9 +66,9 @@ reconnectionHandler: { onConnectionDown: (options, error) => { console.error(error); - // setTimeout(function () { - // document.location.reload(); - // }, 10000); + setTimeout(function () { + document.location.reload(); + }, 10000); }, onConnectionUp: () => { console.log("Client reconnected!"); @@ -76,15 +76,15 @@ } } }).then(() => { - // Blazor.defaultReconnectionHandler._reconnectCallback = function (d) { - // console.log("Client reconnected!"); - // document.location.reload(); - // } - Blazor.defaultReconnectionHandler._reconnectionDisplay = { - show: () => value.show(), - update: (d) => value.update(d), - rejected: (d) => document.location.reload() - }; + Blazor.defaultReconnectionHandler._reconnectCallback = function (d) { + console.log("Client reconnected!"); + document.location.reload(); + } + // Blazor.defaultReconnectionHandler._reconnectionDisplay = { + // show: () => value.show(), + // update: (d) => value.update(d), + // rejected: (d) => document.location.reload() + // }; });