Comparison

net/server.lua @ 773:c36edc1934c5

net.server: Fix potential fatal error in server.lua
author Matthew Wild <mwild1@gmail.com>
date Mon, 09 Feb 2009 13:41:05 +0000
parent 770:bddf52121908
child 775:d4b6714fc829
comparison
equal deleted inserted replaced
772:cbe49bb8d51d 773:c36edc1934c5
437 return dispatch( handler, buffer, err ) 437 return dispatch( handler, buffer, err )
438 else -- connections was closed or fatal error 438 else -- connections was closed or fatal error
439 out_put( "server.lua: client ", ip, ":", clientport, " error: ", err ) 439 out_put( "server.lua: client ", ip, ":", clientport, " error: ", err )
440 fatalerror = true 440 fatalerror = true
441 disconnect( handler, err ) 441 disconnect( handler, err )
442 handler.close( ) 442 _ = handler and handler.close( )
443 return false 443 return false
444 end 444 end
445 end 445 end
446 local _sendbuffer = function( ) -- this function sends data 446 local _sendbuffer = function( ) -- this function sends data
447 local buffer = table_concat( bufferqueue, "", 1, bufferqueuelen ) 447 local buffer = table_concat( bufferqueue, "", 1, bufferqueuelen )