mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-10 01:29:38 +02:00
Smack 4.1.2
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJVjpgTXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxMzU3QjAxODY1QjI1MDNDMTg0NTNEMjA4 Q0FDMkE5Njc4NTQ4RTM1AAoJEIysKpZ4VI41g0IH/3dJedDe6D8BySl4YVoFkQEk Ax6T9oguTHN4o+6wnIjZUMBqycxKbwCppwE8ydrsarpxBicehwLzgaegxqVOtqM/ /7ZNzMiASxzeSCOQpR6dxNYGZp/buY3yaL4hweVh8V+vRVxzk/dXBpl6Syba+G1N ytpCfeC6bGd+Gf5aQ9SA8rPz3ZP99twFNuKYwZGkC8/ePtieT8YthKwwnaIlCuFL BZbhgR24W5pDtaCocTBUnI2wTqv2WsEx6+6LNEHsg2pbAwf2hYw12LPk0krvZOOV PSK/Jtq5qdXrq/vNudvfuVmk5KnhS8BO/WIY+8+EsYBFfP0W7ajZl69KGOxobNQ= =dg39 -----END PGP SIGNATURE----- Merge tag '4.1.2' Smack 4.1.2 Conflicts: version.gradle
This commit is contained in:
commit
ebcbdb75cd
8 changed files with 97 additions and 12 deletions
|
@ -301,7 +301,12 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
|||
}
|
||||
}
|
||||
|
||||
protected ConnectionConfiguration getConfiguration() {
|
||||
/**
|
||||
* Get the connection configuration used by this connection.
|
||||
*
|
||||
* @return the connection configuration.
|
||||
*/
|
||||
public ConnectionConfiguration getConfiguration() {
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@ import org.jivesoftware.smack.XMPPException.StreamErrorException;
|
|||
import org.jivesoftware.smack.packet.StreamError;
|
||||
import org.jivesoftware.smack.util.Async;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.lang.ref.WeakReference;
|
||||
import java.util.Map;
|
||||
import java.util.Random;
|
||||
|
@ -239,8 +240,17 @@ public final class ReconnectionManager {
|
|||
if (isReconnectionPossible(connection)) {
|
||||
connection.connect();
|
||||
}
|
||||
// TODO Starting with Smack 4.2, connect() will no
|
||||
// longer login automatically. So change this and the
|
||||
// previous lines to connection.connect().login() in the
|
||||
// 4.2, or any later, branch.
|
||||
if (!connection.isAuthenticated()) {
|
||||
connection.login();
|
||||
}
|
||||
// Successfully reconnected.
|
||||
attempts = 0;
|
||||
}
|
||||
catch (Exception e) {
|
||||
catch (SmackException | IOException | XMPPException | InterruptedException e) {
|
||||
// Fires the failed reconnection notification
|
||||
for (ConnectionListener listener : connection.connectionListeners) {
|
||||
listener.reconnectionFailed(e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue