mirror of
https://github.com/ShadowKatStudios/OC-Minitel.git
synced 2024-11-22 18:18: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)
|
||||
sock:write("y")
|
||||
for s in r do
|
||||
coroutine.yield()
|
||||
os.sleep(0)
|
||||
sock:write(s)
|
||||
end
|
||||
else
|
||||
@ -102,8 +102,8 @@ local function handleSocket(sock) -- create a coroutine for a new socket
|
||||
log("["..sock.cname.."] Transferring file.",7)
|
||||
local chunk = f:read(net.mtu)
|
||||
repeat
|
||||
coroutine.yield()
|
||||
sock:write(chunk)
|
||||
os.sleep(0)
|
||||
sock:write(chunk or "")
|
||||
chunk = f:read(net.mtu)
|
||||
until not chunk
|
||||
sock:close()
|
||||
|
Loading…
Reference in New Issue
Block a user