aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/Main.java
diff options
context:
space:
mode:
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/Main.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/Main.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/juick-www/src/main/java/com/juick/www/Main.java b/juick-www/src/main/java/com/juick/www/Main.java
index 9934d4e0..075b33fa 100644
--- a/juick-www/src/main/java/com/juick/www/Main.java
+++ b/juick-www/src/main/java/com/juick/www/Main.java
@@ -111,6 +111,17 @@ public class Main extends HttpServlet {
}
}
+ @Override
+ public void destroy() {
+ try {
+ if (xmpp != null)
+ xmpp.close();
+ log("ExternalComponent on WWW destroyed");
+ } catch (Exception e) {
+ log("exception on destroy", e);
+ }
+ }
+
public void setupXmppComponent(final Jid componentJid, final String password, final int port) {
XmppSessionConfiguration configuration = XmppSessionConfiguration.builder()
.extensions(Extension.of(Message.class))