From b9d2be426c6dededb6c1e68f46aa4275f2dc318a Mon Sep 17 00:00:00 2001 From: Herbert Wolverson Date: Fri, 1 Mar 2024 14:17:59 -0600 Subject: [PATCH] Add a safety feature that if a site isn't found, auto-allocate its bin. --- src/LibreQoS.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/LibreQoS.py b/src/LibreQoS.py index d75d7cb9..e96d5dcc 100755 --- a/src/LibreQoS.py +++ b/src/LibreQoS.py @@ -759,9 +759,14 @@ def refreshShapers(): 'children': {} } for node in network: + found = False for bin in range(queuesAvailable): if node in bins[bin]: binnedNetwork["CpueQueue" + str(bin)]['children'][node] = network[node] + found = True + if found == False: + newQueueId = queuesAvailable-1 + binnedNetwork["CpueQueue" + str(newQueueId)]['children'][node] = network[node] #print("Binned network = ", binnedNetwork) network = binnedNetwork