skip initial socket closing if thread was already interrupted

This commit is contained in:
Daniel Gultsch 2017-07-21 08:30:16 +02:00
parent 74cde1d60a
commit 2fc216bfc4

View File

@ -495,7 +495,13 @@ public class XmppConnection implements Runnable {
@Override @Override
public void run() { public void run() {
synchronized (this) {
if (Thread.currentThread().isInterrupted()) {
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": aborting connect because thread was interrupted");
return;
}
forceCloseSocket(); forceCloseSocket();
}
connect(); connect();
} }