diff options
author | Christian Schneppe <christian@pix-art.de> | 2016-11-20 15:02:40 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2016-11-20 15:02:40 +0100 |
commit | f04842b893a82583d094a9204f532841094ef525 (patch) | |
tree | 938fee79a067d7b9b5463adb003f9651f79acef3 /src/main/java/de/pixart/messenger/services | |
parent | e9ebe0ba14ff8d3a8f5261723278f6e6e24cde15 (diff) |
check if thread was interrupted before doing operations on socket
Diffstat (limited to 'src/main/java/de/pixart/messenger/services')
-rw-r--r-- | src/main/java/de/pixart/messenger/services/XmppConnectionService.java | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java index d0b2718d4..cf32ad3a9 100644 --- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java +++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java @@ -3046,8 +3046,6 @@ public class XmppConnectionService extends Service { if (connection == null) { connection = createConnection(account); account.setXmppConnection(connection); - } else { - connection.interrupt(); } if (!account.isOptionSet(Account.OPTION_DISABLED)) { if (!force) { @@ -3056,6 +3054,7 @@ public class XmppConnectionService extends Service { Thread thread = new Thread(connection); connection.setInteractive(interactive); connection.prepareNewConnection(); + connection.interrupt(); thread.start(); scheduleWakeUpCall(Config.CONNECT_DISCO_TIMEOUT, account.getUuid().hashCode()); } else { |