Software /
code /
prosody
Comparison
net/server.lua @ 1577:c0e6d11e35ce
net.server: Remove listener from listeners table when calling removeserver
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 23 Jul 2009 03:06:49 +0100 |
parent | 1574:3692706f78e3 |
child | 1581:4cdf9cefa0bc |
comparison
equal
deleted
inserted
replaced
1576:0cfc7eb6957b | 1577:c0e6d11e35ce |
---|---|
688 local handler = _server[ port ] | 688 local handler = _server[ port ] |
689 if not handler then | 689 if not handler then |
690 return nil, "no server found on port '" .. tostring( port ) "'" | 690 return nil, "no server found on port '" .. tostring( port ) "'" |
691 end | 691 end |
692 handler.close( ) | 692 handler.close( ) |
693 _server[ port ] = nil | |
693 return true | 694 return true |
694 end | 695 end |
695 | 696 |
696 closeall = function( ) | 697 closeall = function( ) |
697 for _, handler in pairs( _socketlist ) do | 698 for _, handler in pairs( _socketlist ) do |