Comparison

net/server_event.lua @ 2123:f7b589f798af

net.server_event: Fix moved line caused by Mercurial's crecord and my selective commits
author Matthew Wild <mwild1@gmail.com>
date Sun, 22 Nov 2009 04:06:00 +0000
parent 2122:dd1da05568e4
child 2124:465a7481ab96
comparison
equal deleted inserted replaced
2122:dd1da05568e4 2123:f7b589f798af
539 if interface.eventreadtimeout then 539 if interface.eventreadtimeout then
540 interface.eventreadtimeout:close( ) 540 interface.eventreadtimeout:close( )
541 interface.eventreadtimeout = nil 541 interface.eventreadtimeout = nil
542 end 542 end
543 end 543 end
544 --vdebug( "read data:", buffer, "error:", err, "part:", part )
545 local buffer, err, part = interface.conn:receive( pattern ) -- receive buffer with "pattern" 544 local buffer, err, part = interface.conn:receive( pattern ) -- receive buffer with "pattern"
545 --vdebug( "read data:", tostring(buffer), "error:", tostring(err), "part:", tostring(part) )
546 buffer = buffer or part or "" 546 buffer = buffer or part or ""
547 local len = string_len( buffer ) 547 local len = string_len( buffer )
548 if len > cfg.MAX_READ_LENGTH then -- check buffer length 548 if len > cfg.MAX_READ_LENGTH then -- check buffer length
549 interface.fatalerror = "receive buffer exceeded" 549 interface.fatalerror = "receive buffer exceeded"
550 debug( "fatal error:", interface.fatalerror ) 550 debug( "fatal error:", interface.fatalerror )