Software /
code /
prosody
Comparison
plugins/mod_admin_telnet.lua @ 6380:4220ffb87b22
net.http, net.http.server, mod_c2s, mod_s2s, mod_component, mod_admin_telnet, mod_net_multiplex: Add ondetach to release connection from 'sessions' table (or equivalent)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 29 Aug 2014 11:54:34 +0100 |
parent | 6311:f44876548487 |
child | 6382:57d23c26039b |
child | 6578:6f55db7afd3b |
comparison
equal
deleted
inserted
replaced
6379:a280bd6ccce2 | 6380:4220ffb87b22 |
---|---|
159 local session = sessions[conn]; | 159 local session = sessions[conn]; |
160 if session then | 160 if session then |
161 session.disconnect(); | 161 session.disconnect(); |
162 sessions[conn] = nil; | 162 sessions[conn] = nil; |
163 end | 163 end |
164 end | |
165 | |
166 function console_listener.ondetach(conn) | |
167 sessions[conn] = nil; | |
164 end | 168 end |
165 | 169 |
166 -- Console commands -- | 170 -- Console commands -- |
167 -- These are simple commands, not valid standalone in Lua | 171 -- These are simple commands, not valid standalone in Lua |
168 | 172 |