diff options
author | Kim Alvefur <zash@zash.se> | 2012-12-28 14:32:22 +0100 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2012-12-28 14:32:22 +0100 |
commit | 5f625f405e737ff7841afd8dac95f5b6bf70f804 (patch) | |
tree | 819d4dac663eeebf97b96def45b07161b70a7df7 | |
parent | 966f062f889718a4d6a4b95a64f1c0d5d4b0f170 (diff) | |
download | prosody-5f625f405e737ff7841afd8dac95f5b6bf70f804.tar.gz prosody-5f625f405e737ff7841afd8dac95f5b6bf70f804.zip |
mod_admin_telnet: Stop processing lines when session is closed
-rw-r--r-- | plugins/mod_admin_telnet.lua | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_admin_telnet.lua b/plugins/mod_admin_telnet.lua index 12ab2355..e1b90684 100644 --- a/plugins/mod_admin_telnet.lua +++ b/plugins/mod_admin_telnet.lua @@ -149,6 +149,7 @@ function console_listener.onincoming(conn, data) end for line in data:gmatch("[^\n]*[\n\004]") do + if session.closed then return end console:process_line(session, line); session.send(string.char(0)); end @@ -168,6 +169,7 @@ end function commands.bye(session) session.print("See you! :)"); + session.closed = true; session.disconnect(); end commands.quit, commands.exit = commands.bye, commands.bye; |