Fix: WebUI reconnect

There was a problem with hashtag based urls. More a browser fault in my view
This commit is contained in:
brindosch 2019-07-29 01:40:44 +02:00 committed by Paulchen-Panther
parent 21206af916
commit f5d0fe34a8
No known key found for this signature in database
GPG Key ID: 84E3B692456B6840

View File

@ -41,7 +41,14 @@ function tryReconnect()
$.ajax({ url: connURL }).done(function(data) {
window.clearInterval(connectionTimer);
window.location.href = connURL;
if(reconnectInterval <= 2000){
let url = connURL;
if (window.connURL.includes("#"))
url = window.connURL.slice(0,window.connURL.indexOf("#"));
window.location.replace(url);
} else {
window.location.reload();
}
})
.fail( function( jqXHR, textStatus ) {
count++;