diff --git a/jicoco/src/main/java/org/jitsi/xmpp/mucclient/MucClient.java b/jicoco/src/main/java/org/jitsi/xmpp/mucclient/MucClient.java index 342f4fb..c337e14 100644 --- a/jicoco/src/main/java/org/jitsi/xmpp/mucclient/MucClient.java +++ b/jicoco/src/main/java/org/jitsi/xmpp/mucclient/MucClient.java @@ -658,7 +658,7 @@ private Callable getConnectAndLoginCallable() // login (because the locally cached SASL mechanisms supported by the server are empty). We // disconnect in order to trigger a re-connect and clear that state on the next attempt. logger.warn("Failed to login. Disconnecting to trigger a re-connect.", e); - xmppConnection.disconnect(); + xmppConnection.disconnect(null); return true; } @@ -871,7 +871,14 @@ public void pingFailed() // This is a weird situation that we have seen in the past when using VPN. // Everything stays like this forever as the socket remains open on the OS level // and it is never dropped. We will trigger reconnect just in case. - xmppConnection.disconnect(); + try + { + xmppConnection.disconnect(null); + } + catch (Exception e) + { + logger.warn("Exception while disconnecting"); + } } } }