1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-15 20:12:04 +01:00

Handle AlreadyLoggedInException in ReconnectionManager

Fixes SMACK-725.
This commit is contained in:
Florian Schmaus 2016-07-01 08:18:56 +02:00
parent d07ed60737
commit 17c9661283

View file

@ -250,6 +250,12 @@ public final class ReconnectionManager {
// Successfully reconnected. // Successfully reconnected.
attempts = 0; attempts = 0;
} }
catch (SmackException.AlreadyLoggedInException e) {
// This can happen if another thread concurrently triggers a reconnection
// and/or login. Obviously it should not be handled as a reconnection
// failure. See also SMACK-725.
LOGGER.log(Level.FINER, "Reconnection not required, was already logged in", e);
}
catch (SmackException | IOException | XMPPException | InterruptedException e) { catch (SmackException | IOException | XMPPException | InterruptedException e) {
// Fires the failed reconnection notification // Fires the failed reconnection notification
for (ConnectionListener listener : connection.connectionListeners) { for (ConnectionListener listener : connection.connectionListeners) {