aboutsummaryrefslogtreecommitdiff
path: root/juick-server/src/main
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2018-03-29 11:10:53 +0300
committerGravatar Vitaly Takmazov2018-03-29 11:10:53 +0300
commitc23b3fa4b938b7ba8e09f34f5e58ad5269f19f26 (patch)
tree4a2e98b5be480c2f7378d9d6a7f92e7482ea2031 /juick-server/src/main
parente4e08d9565b5717830564c7cfc5f1a6a29b3c028 (diff)
server: fix races
Diffstat (limited to 'juick-server/src/main')
-rw-r--r--juick-server/src/main/java/com/juick/server/XMPPConnection.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/juick-server/src/main/java/com/juick/server/XMPPConnection.java b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
index ee67a15c..87164755 100644
--- a/juick-server/src/main/java/com/juick/server/XMPPConnection.java
+++ b/juick-server/src/main/java/com/juick/server/XMPPConnection.java
@@ -126,7 +126,6 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
public void init() {
logger.info("stream router start connecting to {}", componentPort);
xmpp.addStanzaListener(this);
- broadcastPresence(null);
router = ExternalComponent.create(componentName, password, session.getConfiguration(), "localhost",
componentPort);
PingManager pingManager = router.getManager(PingManager.class);
@@ -279,6 +278,7 @@ public class XMPPConnection implements StanzaListener, NotificationListener {
try {
Thread.sleep(3000);
router.connect();
+ broadcastPresence(null);
} catch (InterruptedException | XmppException e) {
logger.warn("xmpp exception", e);
}