Fix reload of homepage after restart in some browsers

This commit is contained in:
Prinz23 2017-02-09 18:19:57 +01:00
parent fa303ef962
commit 89ba88eb96

View file

@ -15,7 +15,10 @@ $.SickGear.numRestartWaits = 0;
function is_alive() {
timeoutId = 0;
$.get(isAliveUrl, function(data) {
$.ajax({url: isAliveUrl,
type: 'GET',
dataType: 'jsonp',
success: function(data) {
var resp = data.msg.toString();
if ('nope' == resp) {
@ -37,7 +40,11 @@ function is_alive() {
$('#refresh_message').removeClass();
window.location = baseUrl + '/home/';
}
}, 'jsonp');
},
error: function(XMLHttpRequest, textStatus, errorThrown) {
setTimeout(is_alive, 100);
}
});
}
$(document).ready(function() {