Merge pull request #794 from ngosang/feature/fixloop

webui: fix infinite loop in browser when bazarr stops
This commit is contained in:
morpheus65535 2020-01-31 20:38:42 -05:00 committed by GitHub
commit f8258aa9cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -423,18 +423,14 @@
ratio: '{value} / {total}'
}
});
}
},
complete: function (data) {
// Schedule the next
if (data.responseText !== "") {
notificationTimeout = setTimeout(doNotificationsAjax, 100);
notificationTimeout = setTimeout(doNotificationsAjax, 100);
} else {
notificationTimeout = setTimeout(doNotificationsAjax, 5000);
notificationTimeout = setTimeout(doNotificationsAjax, 5000);
}
},
error: function () {
notificationTimeout = setTimeout(doNotificationsAjax, 5000);
notificationTimeout = setTimeout(doNotificationsAjax, 5000);
}
});
}