aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/services/XmppConnectionService.java5
-rw-r--r--src/main/java/de/pixart/messenger/xmpp/XmppConnection.java6
2 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
index 43aa7c292..7736aa0ba 100644
--- a/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
+++ b/src/main/java/de/pixart/messenger/services/XmppConnectionService.java
@@ -3163,7 +3163,10 @@ public class XmppConnectionService extends Service {
disconnect(account, force || account.getTrueStatus().isError() || !hasInternet);
account.getRoster().clearPresences();
connection.resetEverything();
- account.getAxolotlService().resetBrokenness();
+ final AxolotlService axolotlService = account.getAxolotlService();
+ if (axolotlService != null) {
+ axolotlService.resetBrokenness();
+ }
if (!hasInternet) {
account.setStatus(Account.State.NO_INTERNET);
}
diff --git a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
index 0e05a2775..4a93d1eb6 100644
--- a/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
+++ b/src/main/java/de/pixart/messenger/xmpp/XmppConnection.java
@@ -102,7 +102,7 @@ public class XmppConnection implements Runnable {
private final WakeLock wakeLock;
private Socket socket;
private XmlReader tagReader;
- private TagWriter tagWriter;
+ private TagWriter tagWriter = new TagWriter();
private final Features features = new Features(this);
private boolean needsBinding = true;
private boolean shouldAuthenticate = true;
@@ -480,7 +480,9 @@ public class XmppConnection implements Runnable {
}
this.socket = socket;
tagReader = new XmlReader(wakeLock);
- if (tagWriter != null) tagWriter.forceClose();
+ if (tagWriter != null) {
+ tagWriter.forceClose();
+ }
tagWriter = new TagWriter();
tagWriter.setOutputStream(socket.getOutputStream());
tagReader.setInputStream(socket.getInputStream());