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

changed the timeout for the bridge server and made the output more useful

This commit is contained in:
Izaya 2018-04-05 20:48:57 +10:00
parent ad4284a340
commit 16f337531a

View File

@ -66,7 +66,7 @@ function clientLoop()
client.conn:close()
clients[id] = nil
end
if client.last+30 < os.time() then
if client.last+3000 < os.time() then
print("Dropping client "..tostring(id).." for inactivity")
client.conn:close()
clients[id] = nil
@ -81,11 +81,11 @@ spawn(clientLoop)
function pushLoop()
while true do
for id,msg in pairs(messages) do
for _,client in pairs(clients) do
for k,client in pairs(clients) do
client.conn:send(msg)
reprint("Message #"..tostring(id).." -> Client #"..tostring(k).." - "..msg)
end
messages[id] = nil
reprint(msg)
end
coroutine.yield()
end