aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
diff options
context:
space:
mode:
authorIngo Bauersachs <ingo@jitsi.org>2013-12-21 15:17:47 +0100
committerIngo Bauersachs <ingo@jitsi.org>2013-12-21 15:17:47 +0100
commitfeadc3e4cce2d3b8e809804fd8f1a64580aae51f (patch)
tree106020af9928dda75779fc364bd9581991b56a08 /src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
parent0b566e6a7826a7c67a03530c1f445e87ace79b3b (diff)
downloadjitsi-feadc3e4cce2d3b8e809804fd8f1a64580aae51f.zip
jitsi-feadc3e4cce2d3b8e809804fd8f1a64580aae51f.tar.gz
jitsi-feadc3e4cce2d3b8e809804fd8f1a64580aae51f.tar.bz2
Prevent deadlock if a XMPP certificate validation fails
Diffstat (limited to 'src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java')
-rw-r--r--src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
index b664ec2..d74c07e 100644
--- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
+++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java
@@ -2433,10 +2433,19 @@ public class ProtocolProviderServiceJabberImpl
}
catch(CertificateException e)
{
- fireRegistrationStateChanged(getRegistrationState(),
+ // notify in a separate thread to avoid a deadlock when a
+ // reg state listener accesses a synchronized XMPPConnection
+ // method (like getRoster)
+ new Thread(new Runnable()
+ {
+ public void run()
+ {
+ fireRegistrationStateChanged(getRegistrationState(),
RegistrationState.UNREGISTERED,
RegistrationStateChangeEvent.REASON_USER_REQUEST,
"Not trusted certificate");
+ }
+ }).start();
throw e;
}