Only check Tunnels if there is at least one tunnel defined

This commit is contained in:
Daniel Poelzleithner 2022-03-30 23:07:45 +02:00
parent 95f8ea67dd
commit 9ec4f42888
1 changed files with 7 additions and 3 deletions

View File

@ -3427,7 +3427,7 @@ Tunnel = (function()
ready = false, ready = false,
retryCount = 0, retryCount = 0,
status = TUNNEL_STATUS.DOWN, status = TUNNEL_STATUS.DOWN,
alarm = false, alarm = true,
rrCounter = 0, rrCounter = 0,
} }
-- provides a default name if needed -- provides a default name if needed
@ -3906,7 +3906,7 @@ local Tunnels = ( function
return #tunnelList return #tunnelList
end end
local nextCycle = false local nextCycle = true
-- --
-- Cycle through all tunnels and call their invoke function -- Cycle through all tunnels and call their invoke function
-- --
@ -3915,7 +3915,11 @@ local Tunnels = ( function
do do
tunnel:invoke(timestamp) tunnel:invoke(timestamp)
end end
nextCycle = now() + 5 if size() > 0 then
nextCycle = now() + 5
else
nextCycle = false
end
end end
-- --