Software /
code /
prosody
Comparison
net/http/server.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 | 6360:ffcd3992a40c |
child | 6382:57d23c26039b |
child | 6589:015f2b4e2f9a |
comparison
equal
deleted
inserted
replaced
6379:a280bd6ccce2 | 6380:4220ffb87b22 |
---|---|
140 open_response:on_destroy(); | 140 open_response:on_destroy(); |
141 end | 141 end |
142 sessions[conn] = nil; | 142 sessions[conn] = nil; |
143 end | 143 end |
144 | 144 |
145 function listener.ondetach(conn) | |
146 sessions[conn] = nil; | |
147 end | |
148 | |
145 function listener.onincoming(conn, data) | 149 function listener.onincoming(conn, data) |
146 sessions[conn]:feed(data); | 150 sessions[conn]:feed(data); |
147 end | 151 end |
148 | 152 |
149 local headerfix = setmetatable({}, { | 153 local headerfix = setmetatable({}, { |