aboutsummaryrefslogtreecommitdiff
path: root/juick-server-xmpp/src/main/java/com/juick
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-04-03 12:57:07 +0300
committerGravatar Vitaly Takmazov2018-04-03 12:57:07 +0300
commit2df2c62ff29a61ef6c03ce162f90eeafa2beb5e9 (patch)
tree32a6492067898c77c9c72383feec0a77f8b08e3b /juick-server-xmpp/src/main/java/com/juick
parentd2af7ac0bbdde07e0f0f8b68c56f370ed3c06fe6 (diff)
xmpp is autoconfigured now
Diffstat (limited to 'juick-server-xmpp/src/main/java/com/juick')
-rw-r--r--juick-server-xmpp/src/main/java/com/juick/server/XMPPConnection.java21
1 files changed, 8 insertions, 13 deletions
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 {