diff options
author | Christian Schneppe <christian@pix-art.de> | 2017-05-10 21:05:27 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2017-05-10 21:05:27 +0200 |
commit | 66aa8520b8359d1718f70c3e16a5f745b2843120 (patch) | |
tree | 048c3456b108065b6e8b6e37cba9d95551872d41 /src/main | |
parent | c8cd71682584dba0f59f81f612e47640ead53515 (diff) |
do not synchronize startXmpp() and sendPacket() on the same object
as this can block the ui
Diffstat (limited to 'src/main')
-rw-r--r-- | src/main/java/de/pixart/messenger/xmpp/XmppConnection.java | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java index 28dddd961..64fb6918b 100644 --- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java +++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java @@ -472,7 +472,7 @@ public class XmppConnection implements Runnable { * * @return true if server returns with valid xmpp, false otherwise */ - private synchronized boolean startXmpp(Socket socket) throws Exception { + private boolean startXmpp(Socket socket) throws Exception { if (Thread.currentThread().isInterrupted()) { throw new InterruptedException(); } @@ -674,9 +674,7 @@ public class XmppConnection implements Runnable { Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": resumption failed"); } resetStreamId(); - if (account.getStatus() != Account.State.ONLINE) { - sendBindRequest(); - } + sendBindRequest(); } else if (nextTag.isStart("iq")) { processIq(nextTag); } else if (nextTag.isStart("message")) { |