From 2df2c62ff29a61ef6c03ce162f90eeafa2beb5e9 Mon Sep 17 00:00:00 2001 From: Vitaly Takmazov Date: Tue, 3 Apr 2018 12:57:07 +0300 Subject: xmpp is autoconfigured now --- .../main/java/com/juick/server/XMPPConnection.java | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) (limited to 'juick-server-xmpp') diff --git a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java index b1fff9fd..3538077a 100644 --- a/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java +++ b/juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java @@ -104,8 +104,6 @@ public class XMPPConnection implements StanzaListener, NotificationListener { private int componentPort; @Value("${xmpp_password:secret}") private String password; - @Value("${xmpp_disabled:false}") - private boolean isXmppDisabled; @Value("${upload_tmp_dir:#{systemEnvironment['TEMP'] ?: '/tmp'}}") private String tmpDir; @Value("${img_path:#{systemEnvironment['TEMP'] ?: '/tmp'}}") @@ -284,17 +282,14 @@ public class XMPPConnection implements StanzaListener, NotificationListener { logger.info("component connected"); } }); - if (!isXmppDisabled) { - service.submit(() -> { - try { - Thread.sleep(3000); - router.connect(); - broadcastPresence(null); - } catch (InterruptedException | XmppException e) { - logger.warn("xmpp exception", e); - } - }); - } + service.submit(() -> { + try { + router.connect(); + broadcastPresence(null); + } catch (XmppException e) { + logger.warn("xmpp exception", e); + } + }); } private String stanzaToString(Stanza stanza) throws XMLStreamException, JAXBException { -- cgit v1.2.3