From 5d6f4c712480d04b60bbed1f7b0efeddf43616a7 Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Wed, 23 May 2012 02:19:11 +0100 Subject: net.server_select: Call ondisconnect handler, even if we closed the socket ourselves (fixes HTTP session hoarding, thanks Maranda) --- net/server_select.lua | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'net') diff --git a/net/server_select.lua b/net/server_select.lua index f5c9e86b..b5d99539 100644 --- a/net/server_select.lua +++ b/net/server_select.lua @@ -350,7 +350,11 @@ wrapconnection = function( server, listeners, socket, ip, serverport, clientport if handler then _writetimes[ handler ] = nil _closelist[ handler ] = nil + local _handler = handler; handler = nil + if disconnect then + disconnect(_handler, "closed"); + end end if server then server.remove( ) -- cgit v1.2.3