aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/eu/siacs/conversations/xmpp
diff options
context:
space:
mode:
authoriNPUTmice <daniel@gultsch.de>2015-02-12 18:53:00 +0100
committeriNPUTmice <daniel@gultsch.de>2015-02-12 18:53:00 +0100
commite68c6a1b740928116cdb5cafa23a202302eefce3 (patch)
tree933d2d7e954989a46cab044735091d819d376b46 /src/main/java/eu/siacs/conversations/xmpp
parent45de788773ffc62bd936fa9b4a5ca81a5a5c6010 (diff)
load messages asynchronously
Diffstat (limited to 'src/main/java/eu/siacs/conversations/xmpp')
-rw-r--r--src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
index 4d6695a5..44c367a6 100644
--- a/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
+++ b/src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java
@@ -659,6 +659,12 @@ public class XmppConnection implements Runnable {
}
private void sendBindRequest() {
+ while(!mXmppConnectionService.areMessagesInitialized()) {
+ try {
+ Thread.sleep(500);
+ } catch (final InterruptedException ignored) {
+ }
+ }
final IqPacket iq = new IqPacket(IqPacket.TYPE.SET);
iq.addChild("bind", "urn:ietf:params:xml:ns:xmpp-bind")
.addChild("resource").setContent(account.getResource());