Handle AlreadyConnectedException in ReconnectionManager

Fixes SMACK-725.
This commit is contained in:
Florian Schmaus 2016-07-04 08:20:57 +02:00
parent e943bbbd91
commit 45b04800a4
1 changed files with 5 additions and 1 deletions

View File

@ -238,7 +238,11 @@ public class ReconnectionManager {
// Makes a reconnection attempt
try {
if (isReconnectionPossible(connection)) {
connection.connect();
try {
connection.connect();
} catch (SmackException.AlreadyConnectedException e) {
LOGGER.log(Level.FINER, "Connection was already connected on reconnection attempt", e);
}
}
// TODO Starting with Smack 4.2, connect() will no
// longer login automatically. So change this and the