Software /
code /
prosody
Comparison
net/xmppcomponent_listener.lua @ 2759:48e8832e5cab
net.xmppcomponent_listener: Don't remove 'log' and 'close' from sessions when destroying, and set destroyed = true
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Sun, 14 Mar 2010 03:07:05 +0000 |
parent | 2758:0476a662dacc |
child | 2925:692b3c6c5bd2 |
comparison
equal
deleted
inserted
replaced
2758:0476a662dacc | 2759:48e8832e5cab |
---|---|
184 log("debug", "Deregistering component"); | 184 log("debug", "Deregistering component"); |
185 cm_deregister_component(session.host); | 185 cm_deregister_component(session.host); |
186 hosts[session.host].connected = nil; | 186 hosts[session.host].connected = nil; |
187 end | 187 end |
188 sessions[conn] = nil; | 188 sessions[conn] = nil; |
189 for k in pairs(session) do session[k] = nil; end | 189 for k in pairs(session) do |
190 if k ~= "log" and k ~= "close" then | |
191 session[k] = nil; | |
192 end | |
193 end | |
194 session.destroyed = true; | |
190 session = nil; | 195 session = nil; |
191 end | 196 end |
192 end | 197 end |
193 | 198 |
194 connlisteners.register('xmppcomponent', component_listener); | 199 connlisteners.register('xmppcomponent', component_listener); |