10.09.2019, 19:56
That's what I did and removed the bad stuff. Still blocks out. tried with or without timeout and timeout of 0 and 1.
Code:
if not skt then
--add receive thread
copas.addthread(function()
skt = socket.tcp()
err = copas.connect(skt,'192.168.0.175', 4999)
skt:settimeout(1)
log(skt)
log(err)
if(skt)then
init()
while true do
local resp,err = skt:receive('*r')
if(resp~=nil) then
local fd,prtd = pcall(parse,resp)
if(fd==false)then
log("Error with parsemsg")
end
end
end
end
end)
end