aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2012-05-23 02:19:11 +0100
committerMatthew Wild <mwild1@gmail.com>2012-05-23 02:19:11 +0100
commit5d6f4c712480d04b60bbed1f7b0efeddf43616a7 (patch)
treea37eda9c3c1584b509529e24eeb0a01466e5fccf
parentc7f054eae60756a7918b31dbf1c55f7bd9317002 (diff)
downloadprosody-5d6f4c712480d04b60bbed1f7b0efeddf43616a7.tar.gz
prosody-5d6f4c712480d04b60bbed1f7b0efeddf43616a7.zip
net.server_select: Call ondisconnect handler, even if we closed the socket ourselves (fixes HTTP session hoarding, thanks Maranda)
-rw-r--r--net/server_select.lua4
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( )