From a1b3978d280993a87033ee3de22b08d6dad9544f Mon Sep 17 00:00:00 2001 From: =?utf8?q?R=C3=A9mi=20Duraffort?= Date: Tue, 9 Nov 2010 20:13:51 +0100 Subject: [PATCH] lua: fix a busy loop (fix #4165) --- share/lua/intf/modules/host.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/share/lua/intf/modules/host.lua b/share/lua/intf/modules/host.lua index 46e422bc1a..65eb993164 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 -- 2.39.5