From 4679da47ffedf2a0f29c324880fa537fe9447f39 Mon Sep 17 00:00:00 2001 From: Alexander Alexeev Date: Fri, 18 Nov 2016 03:47:00 +0700 Subject: correct closing babble components implemented --- juick-www/src/main/java/com/juick/www/Main.java | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'juick-www/src/main/java/com/juick/www') 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)) -- cgit v1.2.3