rimesso 1 solo giro a 10 sec
This commit is contained in:
@@ -58,25 +58,6 @@
|
||||
});
|
||||
</script> *@
|
||||
<script>
|
||||
let timeoutID;
|
||||
function tryReload() {
|
||||
try {
|
||||
timeoutID = setTimeout(function () {
|
||||
document.location.reload();
|
||||
}, 5000);
|
||||
}
|
||||
catch (exceptionVar) {
|
||||
tryReload();
|
||||
}
|
||||
finally {
|
||||
clearMessage();
|
||||
}
|
||||
};
|
||||
|
||||
function clearMessage() {
|
||||
clearTimeout(timeoutID);
|
||||
};
|
||||
|
||||
Blazor.start({
|
||||
reconnectionOptions: {
|
||||
maxRetries: 600,
|
||||
@@ -85,11 +66,9 @@
|
||||
reconnectionHandler: {
|
||||
onConnectionDown: (options, error) => {
|
||||
console.error(error);
|
||||
// setTimeout(function () {
|
||||
// document.location.reload();
|
||||
// }, 5000);
|
||||
setTimeout(tryReload(), 3000);
|
||||
|
||||
setTimeout(function () {
|
||||
document.location.reload();
|
||||
}, 10000);
|
||||
},
|
||||
onConnectionUp: () => {
|
||||
console.log("Client reconnected!");
|
||||
@@ -99,7 +78,7 @@
|
||||
}).then(() => {
|
||||
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
|
||||
console.log("Client reconnected!");
|
||||
document.location.reload();
|
||||
// document.location.reload();
|
||||
}
|
||||
// Blazor.defaultReconnectionHandler._reconnectionDisplay = {
|
||||
// show: () => value.show(),
|
||||
|
||||
Reference in New Issue
Block a user