mirror of
https://github.com/igniterealtime/Spark.git
synced 2025-12-01 12:27:58 +00:00
Spark-1753: Don't be disconnected when receiving invalid stanzas (#155)
* SPARK-1751: Fixing thread ID with chat state notification. * SPARK-1751: Stanzafilter in chat should not require full JID match. * SPARK-1749 SPARK-1735 Restoring MUC participant list size and context menu. * SPARK-1753: Do not disconnect when receiving invalid data.
This commit is contained in:
@ -24,6 +24,7 @@ package org.jivesoftware;
|
|||||||
import org.jivesoftware.resource.Res;
|
import org.jivesoftware.resource.Res;
|
||||||
import org.jivesoftware.smack.*;
|
import org.jivesoftware.smack.*;
|
||||||
import org.jivesoftware.smack.packet.XMPPError;
|
import org.jivesoftware.smack.packet.XMPPError;
|
||||||
|
import org.jivesoftware.smack.parsing.ExceptionLoggingCallback;
|
||||||
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
|
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
|
||||||
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
|
import org.jivesoftware.smack.tcp.XMPPTCPConnectionConfiguration;
|
||||||
import org.jivesoftware.smackx.iqregister.AccountManager;
|
import org.jivesoftware.smackx.iqregister.AccountManager;
|
||||||
@ -360,6 +361,7 @@ public class AccountCreationWizard extends JPanel {
|
|||||||
final XMPPTCPConnectionConfiguration configuration = builder.build();
|
final XMPPTCPConnectionConfiguration configuration = builder.build();
|
||||||
|
|
||||||
final AbstractXMPPConnection connection = new XMPPTCPConnection( configuration );
|
final AbstractXMPPConnection connection = new XMPPTCPConnection( configuration );
|
||||||
|
connection.setParsingExceptionCallback( new ExceptionLoggingCallback() );
|
||||||
connection.connect();
|
connection.connect();
|
||||||
|
|
||||||
return connection;
|
return connection;
|
||||||
|
|||||||
@ -28,6 +28,7 @@ import org.jivesoftware.resource.Default;
|
|||||||
import org.jivesoftware.resource.Res;
|
import org.jivesoftware.resource.Res;
|
||||||
import org.jivesoftware.resource.SparkRes;
|
import org.jivesoftware.resource.SparkRes;
|
||||||
import org.jivesoftware.smack.*;
|
import org.jivesoftware.smack.*;
|
||||||
|
import org.jivesoftware.smack.parsing.ExceptionLoggingCallback;
|
||||||
import org.jivesoftware.smack.proxy.ProxyInfo;
|
import org.jivesoftware.smack.proxy.ProxyInfo;
|
||||||
import org.jivesoftware.smack.sasl.javax.SASLExternalMechanism;
|
import org.jivesoftware.smack.sasl.javax.SASLExternalMechanism;
|
||||||
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
|
import org.jivesoftware.smack.tcp.XMPPTCPConnection;
|
||||||
@ -1030,6 +1031,7 @@ public class LoginDialog {
|
|||||||
// Get connection
|
// Get connection
|
||||||
try {
|
try {
|
||||||
connection = new XMPPTCPConnection(retrieveConnectionConfiguration());
|
connection = new XMPPTCPConnection(retrieveConnectionConfiguration());
|
||||||
|
connection.setParsingExceptionCallback( new ExceptionLoggingCallback() );
|
||||||
//If we want to use the debug version of smack, we have to check if
|
//If we want to use the debug version of smack, we have to check if
|
||||||
//we are on the dispatch thread because smack will create an UI
|
//we are on the dispatch thread because smack will create an UI
|
||||||
if (localPref.isDebuggerEnabled()) {
|
if (localPref.isDebuggerEnabled()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user