mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-26 08:12:05 +01:00
Remove try/catch in startTLSReceived
as exceptions are catched further up the call stack.
This commit is contained in:
parent
08cec251c7
commit
2cd7bbadc5
1 changed files with 4 additions and 8 deletions
|
@ -615,8 +615,9 @@ public class XMPPTCPConnection extends XMPPConnection {
|
||||||
* want to secure the connection.
|
* want to secure the connection.
|
||||||
*
|
*
|
||||||
* @param required true when the server indicates that TLS is required.
|
* @param required true when the server indicates that TLS is required.
|
||||||
|
* @throws IOException if an exception occurs.
|
||||||
*/
|
*/
|
||||||
void startTLSReceived(boolean required) {
|
void startTLSReceived(boolean required) throws IOException {
|
||||||
if (required && config.getSecurityMode() ==
|
if (required && config.getSecurityMode() ==
|
||||||
ConnectionConfiguration.SecurityMode.disabled) {
|
ConnectionConfiguration.SecurityMode.disabled) {
|
||||||
notifyConnectionError(new IllegalStateException(
|
notifyConnectionError(new IllegalStateException(
|
||||||
|
@ -628,13 +629,8 @@ public class XMPPTCPConnection extends XMPPConnection {
|
||||||
// Do not secure the connection using TLS since TLS was disabled
|
// Do not secure the connection using TLS since TLS was disabled
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
try {
|
writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>");
|
||||||
writer.write("<starttls xmlns=\"urn:ietf:params:xml:ns:xmpp-tls\"/>");
|
writer.flush();
|
||||||
writer.flush();
|
|
||||||
}
|
|
||||||
catch (IOException e) {
|
|
||||||
notifyConnectionError(e);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue