webmcp

changeset 482:87c87be92154

Improved memory efficiency of alternative extos.pfilter(...) implementation
author jbe
date Fri Jun 09 18:19:15 2017 +0200 (2017-06-09)
parents 416550ff0bb5
children 5b0066fd326e
files libraries/extos/pfilter.lua
line diff
     1.1 --- a/libraries/extos/pfilter.lua	Tue Jun 06 20:24:57 2017 +0200
     1.2 +++ b/libraries/extos/pfilter.lua	Fri Jun 09 18:19:15 2017 +0200
     1.3 @@ -29,7 +29,9 @@
     1.4          socket:close()
     1.5          read_fds[socket] = nil
     1.6        else
     1.7 -        chunks[#chunks+1] = chunk
     1.8 +        if chunk ~= "" then
     1.9 +          chunks[#chunks+1] = chunk
    1.10 +        end
    1.11          if status == "eof" then
    1.12            socket:close()
    1.13            read_fds[socket] = nil

Impressum / About Us