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)
|
os.kill(v)
|
||||||
end
|
end
|
||||||
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
|
end
|
||||||
function vt.stop()
|
function vt.stop()
|
||||||
for k,v in pairs(proxies) do
|
for k,v in pairs(proxies) do
|
||||||
@ -147,16 +159,6 @@ function vt.settimer(time)
|
|||||||
end
|
end
|
||||||
|
|
||||||
vt.start = start
|
vt.start = start
|
||||||
_G.libs.vtunnel = vt
|
package.loaded.vtunnel = vt
|
||||||
|
|
||||||
start()
|
return vt
|
||||||
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
|
|
||||||
|
Loading…
Reference in New Issue
Block a user