diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2007-06-11 23:44:54 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2007-06-11 23:44:54 +0000 |
commit | 3cd10f5ab6cda5c4a8db829dd38f25168edcfc4a (patch) | |
tree | f0c49eb250f5375414025a9e7022261e729ad905 /etc | |
parent | 3074a8f56b5153f4477e662453102583d7b6f539 (diff) | |
download | luasocket-3cd10f5ab6cda5c4a8db829dd38f25168edcfc4a.tar.gz luasocket-3cd10f5ab6cda5c4a8db829dd38f25168edcfc4a.tar.bz2 luasocket-3cd10f5ab6cda5c4a8db829dd38f25168edcfc4a.zip |
Crashy bug fixed in recvraw.
Also fixed returns on closed socket.
Diffstat (limited to 'etc')
-rw-r--r-- | etc/dispatch.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/etc/dispatch.lua b/etc/dispatch.lua index 6f3855e..3ef1e72 100644 --- a/etc/dispatch.lua +++ b/etc/dispatch.lua | |||
@@ -56,7 +56,7 @@ function socket.protect(f) | |||
56 | if not status then | 56 | if not status then |
57 | if type(results[1]) == 'table' then | 57 | if type(results[1]) == 'table' then |
58 | return nil, results[1][1] | 58 | return nil, results[1][1] |
59 | else error(results[1]) end | 59 | else base.error(results[1]) end |
60 | end | 60 | end |
61 | if coroutine.status(co) == "suspended" then | 61 | if coroutine.status(co) == "suspended" then |
62 | arg = {coroutine.yield(base.unpack(results))} | 62 | arg = {coroutine.yield(base.unpack(results))} |
@@ -219,7 +219,7 @@ function schedule(cortn, status, operation, tcp) | |||
219 | operation.cortn[tcp] = cortn | 219 | operation.cortn[tcp] = cortn |
220 | operation.stamp[tcp] = socket.gettime() | 220 | operation.stamp[tcp] = socket.gettime() |
221 | end | 221 | end |
222 | else error(operation) end | 222 | else base.error(operation) end |
223 | end | 223 | end |
224 | 224 | ||
225 | function kick(operation, tcp) | 225 | function kick(operation, tcp) |