Commit 70da8d74 authored by Pierre Ynard's avatar Pierre Ynard

luarc: end remotely closed connections

Fix a busy loop and socket leak. Thanks to Santiago Gimeno for
pointing it out (Debian bug #607869)
(cherry picked from commit 8e49d55a31f2e96d56e0c65e49b25c4c45589ea6)
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent 2477116b
...@@ -695,9 +695,8 @@ while not vlc.misc.should_die() do ...@@ -695,9 +695,8 @@ while not vlc.misc.should_die() do
if string.match(input,"\n$") then if string.match(input,"\n$") then
client.buffer = string.gsub(client.buffer..input,"\r?\n$","") client.buffer = string.gsub(client.buffer..input,"\r?\n$","")
done = true done = true
elseif client.buffer == "" elseif input == ""
and ((client.type == host.client_type.stdio and input == "") or (client.type == host.client_type.net and input == "\004") then
or (client.type == host.client_type.net and input == "\004")) then
-- Caught a ^D -- Caught a ^D
client.buffer = "quit" client.buffer = "quit"
done = true done = true
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment