bugs and some more testing
general bug fixes
This commit is contained in:
parent
b3b9e12fb8
commit
91090e6dea
1
.gitignore
vendored
1
.gitignore
vendored
@ -12,3 +12,4 @@ test.lua
|
||||
test.lua
|
||||
*.code-workspace
|
||||
*.dat
|
||||
multi\integration\networkManager
|
||||
@ -1786,16 +1786,16 @@ function multi.initThreads(justThreads)
|
||||
if not _ then
|
||||
threads[i].OnError:Fire(threads[i],ret)
|
||||
end
|
||||
if coroutine.status(threads[i].thread)=="dead" then
|
||||
if threads[i] and coroutine.status(threads[i].thread)=="dead" then
|
||||
threads[i].OnDeath:Fire(threads[i],"ended",ret,r1,r2,r3,r4,r5,r6)
|
||||
table.remove(threads,i)
|
||||
elseif threads[i].task == "skip" then
|
||||
elseif threads[i] and threads[i].task == "skip" then
|
||||
threads[i].pos = threads[i].pos + 1
|
||||
if threads[i].count==threads[i].pos then
|
||||
threads[i].task = ""
|
||||
threads[i].__ready = true
|
||||
end
|
||||
elseif threads[i].task == "hold" then --GOHERE
|
||||
elseif threads[i] and threads[i].task == "hold" then --GOHERE
|
||||
t0,t1,t2,t3,t4,t5,t6 = threads[i].func()
|
||||
if t0 then
|
||||
if t0==multi.NIL then
|
||||
@ -1804,12 +1804,12 @@ function multi.initThreads(justThreads)
|
||||
threads[i].task = ""
|
||||
threads[i].__ready = true
|
||||
end
|
||||
elseif threads[i].task == "sleep" then
|
||||
elseif threads[i] and threads[i].task == "sleep" then
|
||||
if clock() - threads[i].time>=threads[i].sec then
|
||||
threads[i].task = ""
|
||||
threads[i].__ready = true
|
||||
end
|
||||
elseif threads[i].task == "holdF" then
|
||||
elseif threads[i] and threads[i].task == "holdF" then
|
||||
t0,t1,t2,t3,t4,t5,t6 = threads[i].func()
|
||||
if t0 then
|
||||
threads[i].task = ""
|
||||
@ -1820,7 +1820,7 @@ function multi.initThreads(justThreads)
|
||||
t0 = nil
|
||||
t1 = "TIMEOUT"
|
||||
end
|
||||
elseif threads[i].task == "holdW" then
|
||||
elseif threads[i] and threads[i].task == "holdW" then
|
||||
threads[i].pos = threads[i].pos + 1
|
||||
t0,t1,t2,t3,t4,t5,t6 = threads[i].func()
|
||||
if t0 then
|
||||
|
||||
@ -1,7 +1,8 @@
|
||||
return function(self,data)
|
||||
local cmd,data = data:match("!(.-)!(.*)")
|
||||
--print(">",cmd,data)
|
||||
if cmd == "PONG" then
|
||||
--
|
||||
self:send("!PONG!")
|
||||
elseif cmd == "CHANNEL" then
|
||||
--
|
||||
elseif cmd == "RETURNS" then
|
||||
|
||||
@ -5,11 +5,18 @@ return function(self,data,client)
|
||||
if cmd == "PING" then
|
||||
self:send(client,"!PONG!")
|
||||
elseif cmd == "N_THREAD" then
|
||||
print(1)
|
||||
local dat = bin.new(data)
|
||||
print(2)
|
||||
local t = dat:getBlock("t")
|
||||
print(3)
|
||||
local ret = bin.new()
|
||||
print(4)
|
||||
ret:addBlock{ID = t.id,rets = {t.func(unpack(t.args))}}
|
||||
print(5)
|
||||
print(client,"!RETURNS!"..ret:getData())
|
||||
self:send(client,"!RETURNS!"..ret:getData())
|
||||
print(6)
|
||||
elseif cmd == "CHANNEL" then
|
||||
local dat = bin.new(data):getBlock("t")
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user