Little improvements, i guess
This commit is contained in:
@@ -7,7 +7,10 @@ local errorMessage = nil
|
||||
local oldPrint = print
|
||||
|
||||
function print(...)
|
||||
local string = string.format(...)
|
||||
local string = ""
|
||||
for _, v in ipairs({...}) do
|
||||
string = string .. v
|
||||
end
|
||||
love.mqtt.send("controller/stdout", string)
|
||||
oldPrint(...)
|
||||
end
|
||||
|
||||
@@ -1078,7 +1078,7 @@ function client_mt:_apply_network_timeout()
|
||||
local allData = ""
|
||||
while true do
|
||||
local size = math.min(totalSize, 16384)
|
||||
local data, err = sync_recv_func(size)
|
||||
local data, err = sync_recv_func(size, ...)
|
||||
if not data and (err == "timeout" or err == "wantread") then
|
||||
loop.timeouted = true
|
||||
coroutine_yield(err)
|
||||
|
||||
@@ -45,7 +45,7 @@ end
|
||||
-- Set connection's socket to non-blocking mode and set a timeout for it
|
||||
function luasocket.settimeout(conn, timeout)
|
||||
conn.timeout = timeout
|
||||
conn.sock:settimeout(timeout, "t")
|
||||
conn.sock:settimeout(timeout, "b")
|
||||
end
|
||||
|
||||
-- export module table
|
||||
|
||||
Reference in New Issue
Block a user