Comparison

net/http.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 5948:1341384628ec
child 6382:57d23c26039b
child 6496:e4b998ffc922
comparison
equal deleted inserted replaced
6379:a280bd6ccce2 6380:4220ffb87b22
67 function listener.ondisconnect(conn, err) 67 function listener.ondisconnect(conn, err)
68 local request = requests[conn]; 68 local request = requests[conn];
69 if request and request.conn then 69 if request and request.conn then
70 request:reader(nil, err); 70 request:reader(nil, err);
71 end 71 end
72 requests[conn] = nil;
73 end
74
75 function listener.ondetach(conn)
72 requests[conn] = nil; 76 requests[conn] = nil;
73 end 77 end
74 78
75 local function request_reader(request, data, err) 79 local function request_reader(request, data, err)
76 if not request.parser then 80 if not request.parser then