1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 10:38:05 +11:00

hopefully fixed keepalives

This commit is contained in:
Izaya 2018-04-06 17:41:28 +10:00
parent 9528dd443d
commit 17c7bc0a13

View File

@ -64,6 +64,9 @@ function clientLoop()
client.buffer = client.buffer .. s
client.last=os.time()
end
if client.buffer:sub(1,3) == "\0\1\0" then
client.buffer=client.buffer:sub(4)
end
if client.buffer:len() > 16384 then
print("Dropping client "..tostring(id).." for wasting resources")
client.conn:close()