Sleep between thoughts when connecting to avoid eating CPU

This commit is contained in:
ShadowNinja 2014-02-22 17:44:03 -05:00
parent b1cbbf1963
commit 2ccee2a935
1 changed files with 1 additions and 0 deletions

View File

@ -137,6 +137,7 @@ function meta_preconnect:connect(_host, _port)
repeat
self:think()
socket.select(nil, nil, 0.1) -- Sleep so that we don't eat CPU
until self.authed
end