diff --git a/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java b/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java index 27b3127e8..bf45530e3 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java @@ -250,6 +250,12 @@ public final class ReconnectionManager { // Successfully reconnected. 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) { // Fires the failed reconnection notification for (ConnectionListener listener : connection.connectionListeners) {