Diff

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
line wrap: on
line diff
--- a/net/http.lua	Fri Aug 29 11:39:56 2014 +0100
+++ b/net/http.lua	Fri Aug 29 11:54:34 2014 +0100
@@ -72,6 +72,10 @@
 	requests[conn] = nil;
 end
 
+function listener.ondetach(conn)
+	requests[conn] = nil;
+end
+
 local function request_reader(request, data, err)
 	if not request.parser then
 		local function error_cb(reason)