[vlc-commits] commit: lua: fix a busy loop (fix #4165) ( Rémi Duraffort )
git at videolan.org
git at videolan.org
Tue Nov 9 21:29:36 CET 2010
vlc/vlc-1.1 | branch: master | Rémi Duraffort <ivoire at videolan.org> | Tue Nov 9 20:13:51 2010 +0100| [ba618396719923a17fb45ad67a2152c88b3e48c2] | committer: Rémi Duraffort
lua: fix a busy loop (fix #4165)
(cherry picked from commit a1b3978d280993a87033ee3de22b08d6dad9544f)
Signed-off-by: Rémi Duraffort <ivoire at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc/vlc-1.1.git/?a=commit;h=ba618396719923a17fb45ad67a2152c88b3e48c2
---
share/lua/intf/modules/host.lua | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/share/lua/intf/modules/host.lua b/share/lua/intf/modules/host.lua
index 46e422b..65eb993 100644
--- a/share/lua/intf/modules/host.lua
+++ b/share/lua/intf/modules/host.lua
@@ -235,6 +235,7 @@ function host()
filter_client( pollfds, status.read, vlc.net.POLLIN )
filter_client( pollfds, status.password, vlc.net.POLLIN )
filter_client( pollfds, status.write, vlc.net.POLLOUT )
+
if listeners.tcp then
for _, listener in pairs(listeners.tcp.list) do
for _, fd in pairs({listener:fds()}) do
@@ -250,9 +251,10 @@ function host()
for _, client in pairs(clients) do
if pollfds[client:fd()] == vlc.net.POLLOUT then
table.insert(wclients,client)
- end
- if pollfds[client:fd()] == vlc.net.POLLIN then
+ elseif pollfds[client:fd()] == vlc.net.POLLIN then
table.insert(rclients,client)
+ else
+ del_client( client )
end
end
if listeners.tcp then
More information about the vlc-commits
mailing list