mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-29 19:18:42 -07:00
WebUI: Ensure that no concurrent timers exist
This commit is contained in:
parent
fdc975d900
commit
7a58a3fe43
4 changed files with 13 additions and 0 deletions
|
@ -23,6 +23,7 @@ var loadTorrentData = function() {
|
|||
var current_hash = myTable.getCurrentTorrentHash();
|
||||
if (current_hash == "") {
|
||||
clearData();
|
||||
clearTimeout(loadTorrentDataTimer);
|
||||
loadTorrentDataTimer = loadTorrentData.delay(5000);
|
||||
return;
|
||||
}
|
||||
|
@ -35,6 +36,7 @@ var loadTorrentData = function() {
|
|||
method: 'get',
|
||||
onFailure: function() {
|
||||
$('error_div').set('html', '_(qBittorrent client is not reachable)');
|
||||
clearTimeout(loadTorrentDataTimer);
|
||||
loadTorrentDataTimer = loadTorrentData.delay(10000);
|
||||
},
|
||||
onSuccess: function(data) {
|
||||
|
@ -72,6 +74,7 @@ var loadTorrentData = function() {
|
|||
else {
|
||||
clearData();
|
||||
}
|
||||
clearTimeout(loadTorrentDataTimer);
|
||||
loadTorrentDataTimer = loadTorrentData.delay(5000);
|
||||
}
|
||||
}).send();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue