mirror of
https://github.com/moparisthebest/Conversations
synced 2024-12-24 08:28:58 -05:00
npe checks
This commit is contained in:
parent
cf9ab4d302
commit
c69ad8f52c
@ -3088,7 +3088,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);
|
||||
}
|
||||
|
@ -100,7 +100,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;
|
||||
@ -449,7 +449,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());
|
||||
|
Loading…
Reference in New Issue
Block a user