aboutsummaryrefslogtreecommitdiff
path: root/juick-api/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-18 09:35:08 +0300
committerGravatar Vitaly Takmazov2016-11-18 09:35:08 +0300
commit66a03f1c8550ee97f98afd733355ae147a55c023 (patch)
treeaec838058be19b9993e9acdd72e5de954214cdc6 /juick-api/src/main/java/com
parent4679da47ffedf2a0f29c324880fa537fe9447f39 (diff)
juick-api: close xmpp on destroy
Diffstat (limited to 'juick-api/src/main/java/com')
-rw-r--r--juick-api/src/main/java/com/juick/api/Main.java10
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);
+ }
+ }
}