Commit b8bf385d authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Shutdown component when removing component from the list of active components.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@3050 b35dd754-fafc-0310-a699-88a17e54d16e
parent 467d682f
...@@ -106,7 +106,7 @@ public class InternalComponentManager implements ComponentManager, RoutableChann ...@@ -106,7 +106,7 @@ public class InternalComponentManager implements ComponentManager, RoutableChann
} }
public void removeComponent(String subdomain) { public void removeComponent(String subdomain) {
components.remove(subdomain); Component component = components.remove(subdomain);
JID componentJID = new JID(subdomain + "." + serverDomain); JID componentJID = new JID(subdomain + "." + serverDomain);
...@@ -119,6 +119,11 @@ public class InternalComponentManager implements ComponentManager, RoutableChann ...@@ -119,6 +119,11 @@ public class InternalComponentManager implements ComponentManager, RoutableChann
if (XMPPServer.getInstance().getIQDiscoItemsHandler() != null) { if (XMPPServer.getInstance().getIQDiscoItemsHandler() != null) {
XMPPServer.getInstance().getIQDiscoItemsHandler().removeComponentItem(componentJID.toBareJID()); XMPPServer.getInstance().getIQDiscoItemsHandler().removeComponentItem(componentJID.toBareJID());
} }
// Ask the component to shutdown
if (component != null) {
component.shutdown();
}
} }
public void sendPacket(Component component, Packet packet) { public void sendPacket(Component component, Packet packet) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment