projects
/
project
/
luci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7d0b17c
)
* libs/httpd: Optimized performance again
author
Steven Barth
<steven@midlink.org>
Wed, 25 Jun 2008 18:44:25 +0000
(18:44 +0000)
committer
Steven Barth
<steven@midlink.org>
Wed, 25 Jun 2008 18:44:25 +0000
(18:44 +0000)
libs/httpd/luasrc/httpd.lua
patch
|
blob
|
history
diff --git
a/libs/httpd/luasrc/httpd.lua
b/libs/httpd/luasrc/httpd.lua
index f471e6b0cc63bf6501d93b0d98f657eaa7fbce1d..9f2dbcde12828ba68bc2908db2e12d406925e3f5 100644
(file)
--- a/
libs/httpd/luasrc/httpd.lua
+++ b/
libs/httpd/luasrc/httpd.lua
@@
-48,13
+48,16
@@
function Thread.receive(self, ...)
local chunk, err, part
self.waiting = true
- repeat
- coroutine.yield()
+ while true do
chunk, err, part = self.socket:receive(...)
- until err ~= "timeout"
-
- self.waiting = false
- return chunk, err, part
+
+ if err ~= "timeout" then
+ self.waiting = false
+ return chunk, err, part
+ end
+
+ coroutine.yield()
+ end
end
function Thread.resume(self, ...)