Hi,
I’ve taken a look at appwarp client code and their code gave me the needed hint to solve the issue (I hope its not premature celebration but I really hope this is it as I’ve spend nearly 3 days on this).
The method client:receive(’*l’) returns a third parameter called partial which was not handled by the client code. When communication is not robust the message takes time to arrive and when that happens calling receive returns a partial result. In addition it arrives with an error message for timeout, so I always thought it was network failure while in fact the connection was ok, simply very slow…
In order to handle that properly I’ve modified the beginning of the tick() internal method on CoroniumGSClient as follows:
local function tick() local input, output = socketlib.select( { self.socket }, { self.socket }, TIMEOUT ) for \_, client in ipairs( input ) do local data, err, partial = client:receive('\*l') if partial and #partial \> 0 then if not self.partialData then self.partialData = partial else self.partialData = self.partialData .. partial end elseif data and not err then --== Incoming data if self.partialData then data = self.partialData .. data self.partialData = nil end local data = json.decode( data ) if type( data ) ~= "table" then data = {} end