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 | 2021e2265fc358f59b155f36265b9fcb8b149c70 (patch) | |
tree | 819d4dac663eeebf97b96def45b07161b70a7df7 /plugins/mod_admin_telnet.lua | |
parent | a79da674d1e5ff1b7a2926294c3d141fabbad294 (diff) | |
download | prosody-2021e2265fc358f59b155f36265b9fcb8b149c70.tar.gz prosody-2021e2265fc358f59b155f36265b9fcb8b149c70.zip |
mod_admin_telnet: Stop processing lines when session is closed
Diffstat (limited to 'plugins/mod_admin_telnet.lua')
-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; |