From 66a03f1c8550ee97f98afd733355ae147a55c023 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Fri, 18 Nov 2016 09:35:08 +0300 Subject: juick-api: close xmpp on destroy --- juick-api/src/main/java/com/juick/api/Main.java | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'juick-api') 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); + } + } } -- cgit v1.2.3