1
0
mirror of https://github.com/kepler155c/opus synced 2025-11-06 02:23:01 +00:00

networking improvements

This commit is contained in:
kepler155c@gmail.com
2017-05-10 19:59:09 -04:00
parent 3a922ad2f4
commit e287958faa
3 changed files with 24 additions and 28 deletions

View File

@@ -32,13 +32,13 @@ while true do
end
end)
-- ensure socket is connected
process:newThread('pinger', function()
while true do
os.sleep(3)
if not socket.connected then
if not socket:ping() then
break
end
socket:ping()
end
end)