Software /
code /
prosody
Diff
net/server_select.lua @ 4903:c576d2175fa4
net.server_select: Call ondisconnect handler, even if we closed the socket ourselves (fixes HTTP session hoarding, thanks Maranda)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 23 May 2012 02:19:11 +0100 |
parent | 4888:c3e17766aead |
child | 4904:5d2ff4627b72 |
line wrap: on
line diff
--- a/net/server_select.lua Tue May 22 14:33:06 2012 +0100 +++ b/net/server_select.lua Wed May 23 02:19:11 2012 +0100 @@ -350,7 +350,11 @@ 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( )