Diff

net/server.lua @ 2766:5fe6ea49cf70

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 2765:3cb9df793269
child 2923:b7049746bd29
line wrap: on
line diff
--- a/net/server.lua	Thu Dec 03 14:08:54 2009 +0000
+++ b/net/server.lua	Thu Dec 03 19:18:18 2009 +0000
@@ -467,7 +467,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