made vtunnel not crash the machine, more actual testing is required
This commit is contained in:
parent
d0378582ae
commit
ba1bf9339d
@ -102,6 +102,18 @@ function start()
|
||||
os.kill(v)
|
||||
end
|
||||
end
|
||||
return os.spawn(function()
|
||||
local last = computer.uptime()
|
||||
while true do
|
||||
local tE = {coroutine.yield()}
|
||||
if computer.uptime() > last + cfg.rtimer then
|
||||
for k,v in pairs(proxies) do
|
||||
v.read()
|
||||
end
|
||||
last = computer.uptime()
|
||||
end
|
||||
end
|
||||
end,"vtunnel")
|
||||
end
|
||||
function vt.stop()
|
||||
for k,v in pairs(proxies) do
|
||||
@ -147,16 +159,6 @@ function vt.settimer(time)
|
||||
end
|
||||
|
||||
vt.start = start
|
||||
_G.libs.vtunnel = vt
|
||||
package.loaded.vtunnel = vt
|
||||
|
||||
start()
|
||||
local last = computer.uptime()
|
||||
while true do
|
||||
local tE = {coroutine.yield()}
|
||||
if computer.uptime() > last + cfg.rtimer then
|
||||
for k,v in pairs(proxies) do
|
||||
v.read()
|
||||
end
|
||||
last = computer.uptime()
|
||||
end
|
||||
end
|
||||
return vt
|
||||
|
Loading…
Reference in New Issue
Block a user