diff options
author | Vitaly Takmazov | 2018-04-03 12:57:07 +0300 |
---|---|---|
committer | Vitaly Takmazov | 2018-04-03 12:57:07 +0300 |
commit | 2df2c62ff29a61ef6c03ce162f90eeafa2beb5e9 (patch) | |
tree | 32a6492067898c77c9c72383feec0a77f8b08e3b /juick-www | |
parent | d2af7ac0bbdde07e0f0f8b68c56f370ed3c06fe6 (diff) |
xmpp is autoconfigured now
Diffstat (limited to 'juick-www')
-rw-r--r-- | juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java b/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java index c8efc9e9..8afddf2d 100644 --- a/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java +++ b/juick-www/src/main/java/com/juick/www/configuration/XMPPConfiguration.java @@ -24,8 +24,6 @@ public class XMPPConfiguration { private String xmppJid; @Value("${xmpp_port:5347}") private int xmppPort; - @Value("${xmpp_disabled:false}") - private boolean isXmppDisabled; @Bean @ConditionalOnMissingBean(type = "rocks.xmpp.extensions.component.accept.ExternalComponent") public ExternalComponent xmpp() { @@ -35,10 +33,9 @@ public class XMPPConfiguration { .build(); ExternalComponent xmpp = ExternalComponent.create(xmppJid, xmppPassword, configuration, xmppHost, xmppPort); xmpp.addConnectionListener(e -> logger.error(e.toString(), e.getCause())); - if (!isXmppDisabled) try { - Thread.sleep(3000); + try { xmpp.connect(); - } catch (XmppException | InterruptedException e) { + } catch (XmppException e) { logger.error("xmpp extension", e); } return xmpp; |