From 0a42551ab760b022589b4e945e0892f2919f9f2d Mon Sep 17 00:00:00 2001 From: Kan18 <24967425+Kan18@users.noreply.github.com> Date: Wed, 28 Dec 2022 19:22:38 +0400 Subject: [PATCH] actually set it to 30 --- sys/apps/network/snmp.lua | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/apps/network/snmp.lua b/sys/apps/network/snmp.lua index e566564..3972441 100644 --- a/sys/apps/network/snmp.lua +++ b/sys/apps/network/snmp.lua @@ -197,19 +197,19 @@ end local function cleanNetwork() for _,c in pairs(_G.network) do local elapsed = os.clock()-c.timestamp - if c.active and elapsed > 90 then + if c.active and elapsed > 50 then c.active = false os.queueEvent('network_detach', c) end end end --- every 60 seconds, send out this computer's info +-- every 30 seconds, send out this computer's info -- send with offset so that messages are evenly distributed and do not all come at once -Event.onTimeout(math.random() * 60, function() +Event.onTimeout(math.random() * 30, function() sendInfo() cleanNetwork() - Event.onInterval(60, function() + Event.onInterval(30, function() sendInfo() cleanNetwork() end) @@ -223,4 +223,4 @@ Event.on('turtle_response', function() end) -- send info early so that computers show soon after booting -Event.onTimeout(math.random() * 4 + 1, sendInfo) +Event.onTimeout(math.random() * 2 + 1, sendInfo)