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:
parent
9528dd443d
commit
17c7bc0a13
@ -64,6 +64,9 @@ function clientLoop()
|
|||||||
client.buffer = client.buffer .. s
|
client.buffer = client.buffer .. s
|
||||||
client.last=os.time()
|
client.last=os.time()
|
||||||
end
|
end
|
||||||
|
if client.buffer:sub(1,3) == "\0\1\0" then
|
||||||
|
client.buffer=client.buffer:sub(4)
|
||||||
|
end
|
||||||
if client.buffer:len() > 16384 then
|
if client.buffer:len() > 16384 then
|
||||||
print("Dropping client "..tostring(id).." for wasting resources")
|
print("Dropping client "..tostring(id).." for wasting resources")
|
||||||
client.conn:close()
|
client.conn:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user