diff options
author | Alexander Alexeev | 2016-11-18 03:47:00 +0700 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-18 09:24:54 +0300 |
commit | 4679da47ffedf2a0f29c324880fa537fe9447f39 (patch) | |
tree | a40e86f6033492a977447b9696437cb894d24f9d /juick-www/src/main/java/com/juick/www | |
parent | c260c0c4a0a8d84a7ef442eb40d5a63e9d5326dc (diff) |
correct closing babble components implemented
Diffstat (limited to 'juick-www/src/main/java/com/juick/www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/Main.java | 11 |
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)) |