aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/xmpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/xmpp')
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 9493b260d..70ae1bc1b 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -1567,15 +1567,8 @@ public class XmppConnection implements Runnable {
}
private void forceCloseSocket() {
- if (socket != null) {
- try {
- socket.close();
- } catch (Exception e) {
- Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": exception " + e.getMessage() + " during force close");
- }
- } else {
- Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": socket was null during force close");
- }
+ FileBackend.close(this.socket);
+ FileBackend.close(this.tagReader);
}
public void interrupt() {
@@ -1586,7 +1579,7 @@ public class XmppConnection implements Runnable {
public void disconnect(final boolean force) {
interrupt();
- Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": disconnecting force=" + Boolean.toString(force));
+ Log.d(Config.LOGTAG, account.getJid().asBareJid() + ": disconnecting force=" + force);
if (force) {
forceCloseSocket();
} else {