mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 03:32:15 -05:00
avoid npe when checking for stream restart
This commit is contained in:
parent
c7ff196f58
commit
ef7857ac8d
@ -360,7 +360,8 @@ public class XmppConnection implements Runnable {
|
||||
String.valueOf(saslMechanism.getPriority()));
|
||||
tagReader.reset();
|
||||
sendStartStream();
|
||||
if (tagReader.readTag().isStart("stream")) {
|
||||
final Tag tag = tagReader.readTag();
|
||||
if (tag != null && tag.isStart("stream")) {
|
||||
processStream();
|
||||
} else {
|
||||
throw new IOException("server didn't restart stream after successful auth");
|
||||
@ -647,7 +648,8 @@ public class XmppConnection implements Runnable {
|
||||
sendStartStream();
|
||||
Log.d(Config.LOGTAG, account.getJid().toBareJid()+ ": TLS connection established");
|
||||
features.encryptionEnabled = true;
|
||||
if (tagReader.readTag().isStart("stream")) {
|
||||
final Tag tag = tagReader.readTag();
|
||||
if (tag != null && tag.isStart("stream")) {
|
||||
processStream();
|
||||
} else {
|
||||
throw new IOException("server didn't restart stream after STARTTLS");
|
||||
|
Loading…
Reference in New Issue
Block a user