readtraffic = readtraffic + count\r
_readtraffic = _readtraffic + count\r
_readtimes[ handler ] = _currenttime\r
- --out_put( "server.lua: read data '", buffer, "', error: ", err )\r
+ --out_put( "server.lua: read data '", buffer:gsub("[^%w%p ]", "."), "', error: ", err )\r
return dispatch( handler, buffer, err )\r
else -- connections was closed or fatal error\r
- out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " error: ", tostring(err) )\r
+ out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " read error: ", tostring(err) )\r
fatalerror = true\r
disconnect( handler, err )\r
_ = handler and handler.close( )\r
_writetimes[ handler ] = _currenttime\r
return true\r
else -- connection was closed during sending or fatal error\r
- out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " error: ", tostring(err) )\r
+ out_put( "server.lua: client ", tostring(ip), ":", tostring(clientport), " write error: ", tostring(err) )\r
fatalerror = true\r
disconnect( handler, err )\r
_ = handler and handler.close( )\r
_currenttime = os_time( )\r
if os_difftime( _currenttime - _timer ) >= 1 then\r
for i = 1, _timerlistlen do\r
- _timerlist[ i ]( ) -- fire timers\r
+ _timerlist[ i ]( _currenttime ) -- fire timers\r
end\r
_timer = _currenttime\r
end\r