Software /
code /
prosody
Diff
net/server_select.lua @ 2312:5ddbb9c89ffe
net.server_select: Restore checks for wantread/timeout errors on receive
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 03 Dec 2009 19:18:18 +0000 |
parent | 2307:fc7e0962520a |
child | 2318:a831de056de3 |
line wrap: on
line diff
--- a/net/server_select.lua Thu Dec 03 17:07:37 2009 +0100 +++ b/net/server_select.lua Thu Dec 03 19:18:18 2009 +0000 @@ -474,7 +474,7 @@ end local _readbuffer = function( ) -- this function reads data local buffer, err, part = receive( socket, pattern ) -- receive buffer with "pattern" - if not err or string_len(part) > 0 then -- received something + if not err or (err == "wantread" or err == "timeout") or string_len(part) > 0 then -- received something local buffer = buffer or part or "" local len = string_len( buffer ) if len > maxreadlen then