Software /
code /
prosody
Comparison
plugins/mod_component.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 | 5953:1c08d6cca552 |
child | 6382:57d23c26039b |
child | 6773:ef22c17cc24d |
comparison
equal
deleted
inserted
replaced
6379:a280bd6ccce2 | 6380:4220ffb87b22 |
---|---|
317 session.destroyed = true; | 317 session.destroyed = true; |
318 session = nil; | 318 session = nil; |
319 end | 319 end |
320 end | 320 end |
321 | 321 |
322 function listener.ondetach(conn) | |
323 sessions[conn] = nil; | |
324 end | |
325 | |
322 module:provides("net", { | 326 module:provides("net", { |
323 name = "component"; | 327 name = "component"; |
324 private = true; | 328 private = true; |
325 listener = listener; | 329 listener = listener; |
326 default_port = 5347; | 330 default_port = 5347; |