mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-18 14:38:04 -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:
@@ -88,7 +88,7 @@ window.qBittorrent.PropWebseeds ??= (() => {
|
||||
|
||||
let current_hash = "";
|
||||
|
||||
let loadWebSeedsDataTimer;
|
||||
let loadWebSeedsDataTimer = -1;
|
||||
const loadWebSeedsData = function() {
|
||||
if ($("prop_webseeds").hasClass("invisible")
|
||||
|| $("propertiesPanel_collapseToggle").hasClass("panel-expand")) {
|
||||
@@ -138,6 +138,7 @@ window.qBittorrent.PropWebseeds ??= (() => {
|
||||
|
||||
const updateData = function() {
|
||||
clearTimeout(loadWebSeedsDataTimer);
|
||||
loadWebSeedsDataTimer = -1;
|
||||
loadWebSeedsData();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user