Comparison

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
comparison
equal deleted inserted replaced
4902:a7c799a7a34b 4903:c576d2175fa4
348 out_put "server.lua: socket already closed" 348 out_put "server.lua: socket already closed"
349 end 349 end
350 if handler then 350 if handler then
351 _writetimes[ handler ] = nil 351 _writetimes[ handler ] = nil
352 _closelist[ handler ] = nil 352 _closelist[ handler ] = nil
353 local _handler = handler;
353 handler = nil 354 handler = nil
355 if disconnect then
356 disconnect(_handler, "closed");
357 end
354 end 358 end
355 if server then 359 if server then
356 server.remove( ) 360 server.remove( )
357 end 361 end
358 out_put "server.lua: closed client handler and removed socket from list" 362 out_put "server.lua: closed client handler and removed socket from list"