Software /
code /
prosody
Comparison
core/hostmanager.lua @ 4731:84596fc32b31
hostmanager: Add some TODO comments
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 27 Apr 2012 22:32:04 +0100 |
parent | 4730:2587e249927f |
child | 4732:29ff25c8bf56 |
comparison
equal
deleted
inserted
replaced
4730:2587e249927f | 4731:84596fc32b31 |
---|---|
107 if type(reason) ~= "table" then | 107 if type(reason) ~= "table" then |
108 reason = { condition = "host-gone", text = tostring(reason or "This server has stopped serving "..host) }; | 108 reason = { condition = "host-gone", text = tostring(reason or "This server has stopped serving "..host) }; |
109 end | 109 end |
110 | 110 |
111 -- Disconnect local users, s2s connections | 111 -- Disconnect local users, s2s connections |
112 -- TODO: These should move to mod_c2s and mod_s2s (how do they know they're being unloaded and not reloaded?) | |
112 if host_session.sessions then | 113 if host_session.sessions then |
113 for username, user in pairs(host_session.sessions) do | 114 for username, user in pairs(host_session.sessions) do |
114 for resource, session in pairs(user.sessions) do | 115 for resource, session in pairs(user.sessions) do |
115 log("debug", "Closing connection for %s@%s/%s", username, host, resource); | 116 log("debug", "Closing connection for %s@%s/%s", username, host, resource); |
116 session:close(reason); | 117 session:close(reason); |
131 log("debug", "Closing incoming connection from %s", remote_session.from_host or "<unknown>"); | 132 log("debug", "Closing incoming connection from %s", remote_session.from_host or "<unknown>"); |
132 remote_session:close(reason); | 133 remote_session:close(reason); |
133 end | 134 end |
134 end | 135 end |
135 | 136 |
137 -- TODO: This should be done in modulemanager | |
136 if host_session.modules then | 138 if host_session.modules then |
137 for module in pairs(host_session.modules) do | 139 for module in pairs(host_session.modules) do |
138 modulemanager.unload(host, module); | 140 modulemanager.unload(host, module); |
139 end | 141 end |
140 end | 142 end |