mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-21 07:57:22 -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:
@@ -37,7 +37,7 @@ window.qBittorrent.PropPeers ??= (() => {
|
||||
};
|
||||
|
||||
const torrentPeersTable = new window.qBittorrent.DynamicTable.TorrentPeersTable();
|
||||
let loadTorrentPeersTimer;
|
||||
let loadTorrentPeersTimer = -1;
|
||||
let syncTorrentPeersLastResponseId = 0;
|
||||
let show_flags = true;
|
||||
|
||||
@@ -109,6 +109,7 @@ window.qBittorrent.PropPeers ??= (() => {
|
||||
|
||||
const updateData = function() {
|
||||
clearTimeout(loadTorrentPeersTimer);
|
||||
loadTorrentPeersTimer = -1;
|
||||
loadTorrentPeersData();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user