Commit 0f68ddf8 authored by Pierre Ynard's avatar Pierre Ynard

luatelnet: fix ending connections

(cherry picked from commit 90000056f6c533170b92dd37fe1655e25f85c317)
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent e76b2834
......@@ -184,14 +184,14 @@ while not vlc.misc.should_die() do
local str = client.cmds .. client:recv(1000)
if not str then -- the telnet client program has left
client.cmds = "quit"
client.cmds = "quit\n"
elseif string.match(str,"\n") then
client.cmds = str
elseif client.buffer == ""
and ((client.type == host.client_type.stdio and str == "")
or (client.type == host.client_type.net and str == "\004")) then
-- Caught a ^D
client.cmds = "quit"
client.cmds = "quit\n"
end
client.buffer = ""
......
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