From e68c6a1b740928116cdb5cafa23a202302eefce3 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Thu, 12 Feb 2015 18:53:00 +0100 Subject: load messages asynchronously --- src/main/java/eu/siacs/conversations/xmpp/XmppConnection.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/main/java/eu/siacs/conversations/xmpp') 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()); -- cgit v1.2.3