Do not consider rx-only hosts as active hosts in limit check

This commit is contained in:
Alfredo Cardigliano 2025-04-23 15:37:07 +02:00
parent b54d12b3a4
commit 75a40c7fdd
3 changed files with 25 additions and 1 deletions

View file

@ -503,6 +503,11 @@ function predicates.hosts_limit_exceeded(toast, container)
local level = nil
local hosts = interface.getNumLocalHosts()
local rxonly_hosts = interface.getNumLocalRxOnlyHosts()
if hosts >= rxonly_hosts then -- Safety check
hosts = hosts - rxonly_hosts -- Do not consider non-existing hosts
end
if hosts > prefs.hosts_limit then
level = ToastLevel.WARNING
end