introduced error code for server not opening stream after auth or starttls
This commit is contained in:
parent
cf879dd8e8
commit
9816261569
File diff suppressed because it is too large
Load Diff
|
@ -398,6 +398,9 @@ public class XmppConnection implements Runnable {
|
|||
break; // successfully connected to server that speaks xmpp
|
||||
} else {
|
||||
localSocket.close();
|
||||
if (!iterator.hasNext()) {
|
||||
throw new StateChangingException(Account.State.STREAM_OPENING_ERROR);
|
||||
}
|
||||
}
|
||||
} catch (final StateChangingException e) {
|
||||
throw e;
|
||||
|
@ -520,7 +523,7 @@ public class XmppConnection implements Runnable {
|
|||
if (tag != null && tag.isStart("stream")) {
|
||||
processStream();
|
||||
} else {
|
||||
throw new IOException("server didn't restart stream after successful auth");
|
||||
throw new StateChangingException(Account.State.STREAM_OPENING_ERROR);
|
||||
}
|
||||
break;
|
||||
} else if (nextTag.isStart("failure")) {
|
||||
|
@ -860,7 +863,7 @@ public class XmppConnection implements Runnable {
|
|||
SSLSocketHelper.log(account, sslSocket);
|
||||
processStream();
|
||||
} else {
|
||||
throw new IOException("server didn't restart stream after STARTTLS");
|
||||
throw new StateChangingException(Account.State.STREAM_OPENING_ERROR);
|
||||
}
|
||||
sslSocket.close();
|
||||
} catch (final NoSuchAlgorithmException | KeyManagementException e1) {
|
||||
|
|
|
@ -152,6 +152,7 @@
|
|||
<string name="account_status_policy_violation">Policy violation</string>
|
||||
<string name="account_status_incompatible_server">Incompatible server</string>
|
||||
<string name="account_status_stream_error">Stream error</string>
|
||||
<string name="account_status_stream_opening_error">Stream opening error</string>
|
||||
<string name="encryption_choice_unencrypted">Unencrypted</string>
|
||||
<string name="encryption_choice_otr">OTR</string>
|
||||
<string name="encryption_choice_pgp">OpenPGP</string>
|
||||
|
|
Loading…
Reference in New Issue