diff options
author | Vitaly Takmazov | 2016-11-18 09:35:08 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2016-11-18 09:35:08 +0300 |
commit | 66a03f1c8550ee97f98afd733355ae147a55c023 (patch) | |
tree | aec838058be19b9993e9acdd72e5de954214cdc6 /juick-api/src/main/java | |
parent | 4679da47ffedf2a0f29c324880fa537fe9447f39 (diff) |
juick-api: close xmpp on destroy
Diffstat (limited to 'juick-api/src/main/java')
-rw-r--r-- | juick-api/src/main/java/com/juick/api/Main.java | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/juick-api/src/main/java/com/juick/api/Main.java b/juick-api/src/main/java/com/juick/api/Main.java index 2ca126d0..d5851c12 100644 --- a/juick-api/src/main/java/com/juick/api/Main.java +++ b/juick-api/src/main/java/com/juick/api/Main.java @@ -481,4 +481,14 @@ public class Main extends HttpServlet { } } } + @Override + public void destroy() { + try { + if (xmpp != null) { + xmpp.close(); + } + } catch (Exception e) { + log("exception on destroy", e); + } + } } |