mirror of
https://github.com/octoleo/lsyncd.git
synced 2024-12-12 14:17:47 +00:00
Only check Tunnels if there is at least one tunnel defined
This commit is contained in:
parent
95f8ea67dd
commit
9ec4f42888
10
lsyncd.lua
10
lsyncd.lua
@ -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
|
||||||
|
|
||||||
--
|
--
|
||||||
|
Loading…
Reference in New Issue
Block a user