diff options
3 files changed, 26 insertions, 5 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 8302d6e..aca2943 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/ProtocolProviderServiceJabberImpl.java @@ -1944,10 +1944,15 @@ public class ProtocolProviderServiceJabberImpl return; } } - // if we are already unregistered, there will not be a new fire - // if not we will clean and provider will fire its - // provider state change - unregister(true); + // fire that a connection failed, the reconnection mechanism + // will look after us and will clean us, other wise we can do + // a dead lock (connection closed is called + // within xmppConneciton and calling disconnect again can lock it) + fireRegistrationStateChanged( + getRegistrationState(), + RegistrationState.CONNECTION_FAILED, + RegistrationStateChangeEvent.REASON_NOT_SPECIFIED, + null); } /** diff --git a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/keepalive/KeepAliveManager.java b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/keepalive/KeepAliveManager.java index 5f99a18..f37c44a 100644 --- a/src/net/java/sip/communicator/impl/protocol/jabber/extensions/keepalive/KeepAliveManager.java +++ b/src/net/java/sip/communicator/impl/protocol/jabber/extensions/keepalive/KeepAliveManager.java @@ -197,6 +197,15 @@ public class KeepAliveManager logger.trace("provider not registered. " +"won't send keep alive for " + parentProvider.getAccountID().getDisplayName()); + + parentProvider.unregister(false); + + parentProvider.fireRegistrationStateChanged( + parentProvider.getRegistrationState(), + RegistrationState.CONNECTION_FAILED, + RegistrationStateChangeEvent.REASON_SERVER_NOT_FOUND, + null); + return; } diff --git a/src/net/java/sip/communicator/util/NetworkUtils.java b/src/net/java/sip/communicator/util/NetworkUtils.java index 7f1aabc..d0d543c 100644 --- a/src/net/java/sip/communicator/util/NetworkUtils.java +++ b/src/net/java/sip/communicator/util/NetworkUtils.java @@ -1416,7 +1416,14 @@ public class NetworkUtils { // reread system dns configuration ResolverConfig.refresh(); - DnsUtilActivator.refreshResolver(); + try + { + DnsUtilActivator.refreshResolver(); + } + catch(Throwable t) + { + logger.error("Error reloading dns util activator"); + } if(parallelResolver instanceof ParallelResolver) { //needs a separate lock object because the parallelResolver could |