test nuovo reconnection handler
This commit is contained in:
@@ -71,18 +71,27 @@
|
||||
<script>
|
||||
Blazor.start({
|
||||
reconnectionOptions: {
|
||||
maxRetries: 600,
|
||||
maxRetries: Infinity,
|
||||
retryIntervalMilliseconds: 1000
|
||||
},
|
||||
reconnectionHandler: {
|
||||
onConnectionDown: (options, error) => console.error(error),
|
||||
onConnectionUp: () => console.log("Client reconnected!")
|
||||
}
|
||||
}).then(() => {
|
||||
Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
|
||||
document.location.reload();
|
||||
onConnectionDown: (options, error) => {
|
||||
Blazor.defaultReconnectionHandler.onConnectionDown(options, error);
|
||||
Blazor.defaultReconnectionHandler._reconnectionDisplay.rejected = function () {
|
||||
window.location.reload();
|
||||
}
|
||||
},
|
||||
onConnectionUp: () => {
|
||||
console.log("Client reconnected!");
|
||||
document.location.reload();
|
||||
}
|
||||
}
|
||||
});
|
||||
// }).then(() => {
|
||||
// Blazor.defaultReconnectionHandler._reconnectCallback = function (d) {
|
||||
// document.location.reload();
|
||||
// }
|
||||
// });
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user