Skip to content

Commit

Permalink
Merge pull request #502 from guusdk/SPARK-2140_disable-stream-management
Browse files Browse the repository at this point in the history
Disable Smacks support for Stream Management (for now)
  • Loading branch information
wrooot committed Aug 5, 2020
2 parents 59272b6 + 53743ef commit ea1dafd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion core/src/main/java/org/jivesoftware/LoginDialog.java
Expand Up @@ -264,14 +264,15 @@ protected XMPPTCPConnectionConfiguration retrieveConnectionConfiguration() {
} catch (XmppStringprepException e) {
throw new IllegalStateException(e);
}

final XMPPTCPConnectionConfiguration.Builder builder = XMPPTCPConnectionConfiguration.builder()
.setUsernameAndPassword(loginUsername, loginPassword)
.setXmppDomain(xmppDomain)
.setPort(port)
.setSendPresence(false)
.setCompressionEnabled(localPref.isCompressionEnabled())
.setSecurityMode( securityMode );

if ( securityMode != ConnectionConfiguration.SecurityMode.disabled && localPref.isDisableHostnameVerification()) {
TLSUtils.disableHostnameVerificationForTlsCertificates(builder);
}
Expand Down Expand Up @@ -1119,6 +1120,9 @@ private boolean login()

try
{
// TODO: SPARK-2140 - add support to Spark for stream management. Challenges expected around reconnection logic!
XMPPTCPConnection.setUseStreamManagementDefault(false);

connection = new XMPPTCPConnection( retrieveConnectionConfiguration() );
connection.setParsingExceptionCallback( new ExceptionLoggingCallback() );

Expand Down

0 comments on commit ea1dafd

Please sign in to comment.