Crashy bug fixed in recvraw.

Also fixed returns on closed socket.
This commit is contained in:
Diego Nehab 2007-06-11 23:44:54 +00:00
parent 3074a8f56b
commit 3cd10f5ab6
12 changed files with 97 additions and 33 deletions

View file

@ -56,7 +56,7 @@ function socket.protect(f)
if not status then
if type(results[1]) == 'table' then
return nil, results[1][1]
else error(results[1]) end
else base.error(results[1]) end
end
if coroutine.status(co) == "suspended" then
arg = {coroutine.yield(base.unpack(results))}
@ -219,7 +219,7 @@ function schedule(cortn, status, operation, tcp)
operation.cortn[tcp] = cortn
operation.stamp[tcp] = socket.gettime()
end
else error(operation) end
else base.error(operation) end
end
function kick(operation, tcp)