diff options
author | Matthew Wild <mwild1@gmail.com> | 2012-05-23 02:19:11 +0100 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2012-05-23 02:19:11 +0100 |
commit | 62ecc088dbf1f32842bf175d308625172d7d0e09 (patch) | |
tree | a37eda9c3c1584b509529e24eeb0a01466e5fccf /net | |
parent | 284be50f1c3b7a7278335ef3db7abf8b8d9ec9ce (diff) | |
download | prosody-62ecc088dbf1f32842bf175d308625172d7d0e09.tar.gz prosody-62ecc088dbf1f32842bf175d308625172d7d0e09.zip |
net.server_select: Call ondisconnect handler, even if we closed the socket ourselves (fixes HTTP session hoarding, thanks Maranda)
Diffstat (limited to 'net')
-rw-r--r-- | net/server_select.lua | 4 |
1 files changed, 4 insertions, 0 deletions
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( ) |