Mercurial > prosody-hg
comparison plugins/mod_s2s/mod_s2s.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 |
| parents | 3cec0eef0b70 |
| children | 57d23c26039b 95d93c4f9d40 |
comparison
equal
deleted
inserted
replaced
| 6379:a280bd6ccce2 | 6380:4220ffb87b22 |
|---|---|
| 636 session.direction = "outgoing"; | 636 session.direction = "outgoing"; |
| 637 sessions[conn] = session; | 637 sessions[conn] = session; |
| 638 initialize_session(session); | 638 initialize_session(session); |
| 639 end | 639 end |
| 640 | 640 |
| 641 function listener.ondetach(conn) | |
| 642 sessions[conn] = nil; | |
| 643 end | |
| 644 | |
| 641 function check_auth_policy(event) | 645 function check_auth_policy(event) |
| 642 local host, session = event.host, event.session; | 646 local host, session = event.host, event.session; |
| 643 local must_secure = secure_auth; | 647 local must_secure = secure_auth; |
| 644 | 648 |
| 645 if not must_secure and secure_domains[host] then | 649 if not must_secure and secure_domains[host] then |
