Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Do not send presence unavailable after a failure. #192

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions jicoco/src/main/java/org/jitsi/xmpp/mucclient/MucClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -658,7 +658,7 @@ private Callable<Boolean> 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;
}

Expand Down Expand Up @@ -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");
}
}
}
}
Expand Down
Loading