do not synchronize startXmpp() and sendPacket() on the same object as this can block the ui
This commit is contained in:
parent
be371ac5df
commit
9a7d925b97
|
@ -441,7 +441,7 @@ public class XmppConnection implements Runnable {
|
|||
* Starts xmpp protocol, call after connecting to socket
|
||||
* @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();
|
||||
}
|
||||
|
@ -643,9 +643,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")) {
|
||||
|
|
Loading…
Reference in a new issue