aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main/java/com/juick
diff options
context:
space:
mode:
Diffstat (limited to 'juick-server/src/main/java/com/juick')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPServer.java5
1 files changed, 1 insertions, 4 deletions
diff --git a/juick-server/src/main/java/com/juick/server/XMPPServer.java b/juick-server/src/main/java/com/juick/server/XMPPServer.java
index 53ad61a6..c651a16c 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPServer.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPServer.java
@@ -145,7 +145,7 @@ public class XMPPServer implements ConnectionListener, AutoCloseable {
@Override
public void close() throws Exception {
- if (!listener.isClosed()) {
+ if (listener != null && !listener.isClosed()) {
listener.close();
}
outConnections.forEach((c, s) -> {
@@ -156,9 +156,6 @@ public class XMPPServer implements ConnectionListener, AutoCloseable {
c.closeConnection();
inConnections.remove(c);
});
- if (!listener.isClosed()) {
- listener.close();
- }
service.shutdown();
logger.info("XMPP server destroyed");
}