mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 06:28:03 -06:00
WebUI: clear timer variable properly
In JS the timer handle pool is reused and therefore require careful handling of it.
This commit is contained in:
@@ -39,7 +39,7 @@ window.qBittorrent.PropTrackers ??= (() => {
|
||||
let current_hash = "";
|
||||
|
||||
const torrentTrackersTable = new window.qBittorrent.DynamicTable.TorrentTrackersTable();
|
||||
let loadTrackersDataTimer;
|
||||
let loadTrackersDataTimer = -1;
|
||||
|
||||
const loadTrackersData = function() {
|
||||
if ($("prop_trackers").hasClass("invisible")
|
||||
@@ -119,6 +119,7 @@ window.qBittorrent.PropTrackers ??= (() => {
|
||||
|
||||
const updateData = function() {
|
||||
clearTimeout(loadTrackersDataTimer);
|
||||
loadTrackersDataTimer = -1;
|
||||
loadTrackersData();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user