mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-23 02:28:05 +11:00
fixed some temporary hangs in fserv
This commit is contained in:
parent
645fcf8270
commit
cb3847d1c4
@ -63,7 +63,7 @@ local function handleSocket(sock) -- create a coroutine for a new socket
|
|||||||
log("["..sock.cname.."] Transferring remote file.",7)
|
log("["..sock.cname.."] Transferring remote file.",7)
|
||||||
sock:write("y")
|
sock:write("y")
|
||||||
for s in r do
|
for s in r do
|
||||||
coroutine.yield()
|
os.sleep(0)
|
||||||
sock:write(s)
|
sock:write(s)
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -102,8 +102,8 @@ local function handleSocket(sock) -- create a coroutine for a new socket
|
|||||||
log("["..sock.cname.."] Transferring file.",7)
|
log("["..sock.cname.."] Transferring file.",7)
|
||||||
local chunk = f:read(net.mtu)
|
local chunk = f:read(net.mtu)
|
||||||
repeat
|
repeat
|
||||||
coroutine.yield()
|
os.sleep(0)
|
||||||
sock:write(chunk)
|
sock:write(chunk or "")
|
||||||
chunk = f:read(net.mtu)
|
chunk = f:read(net.mtu)
|
||||||
until not chunk
|
until not chunk
|
||||||
sock:close()
|
sock:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user