aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-08-01 13:27:03 +0200
committerChristian Schneppe <christian@pix-art.de>2017-08-01 13:27:03 +0200
commit9d5a51c054def5a565675cfbff9cb07720c20dc2 (patch)
tree9806da6af1a9a990f31d9d5f363f760b5b80d1ee /src/main/java/de/pixart
parent826aa79d1c94877b97094597de8f1a339db238ae (diff)
skip initial socket closing if thread was already interrupted
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 1976bdc4a..084040db1 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -525,7 +525,13 @@ public class XmppConnection implements Runnable {
@Override
public void run() {
- forceCloseSocket();
+ synchronized (this) {
+ if (Thread.currentThread().isInterrupted()) {
+ Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": aborting connect because thread was interrupted");
+ return;
+ }
+ forceCloseSocket();
+ }
connect();
}