mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Don't automatically login() on connect()
if the connection was authenticated before. Fixes SMACK-647.
This commit is contained in:
parent
b4694ec152
commit
6c637d5784
2 changed files with 6 additions and 13 deletions
|
@ -332,11 +332,11 @@ public abstract class AbstractXMPPConnection implements XMPPConnection {
|
||||||
public abstract boolean isUsingCompression();
|
public abstract boolean isUsingCompression();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establishes a connection to the XMPP server and performs an automatic login
|
* Establishes a connection to the XMPP server. It basically
|
||||||
* only if the previous connection state was logged (authenticated). It basically
|
|
||||||
* creates and maintains a connection to the server.
|
* creates and maintains a connection to the server.
|
||||||
* <p>
|
* <p>
|
||||||
* Listeners will be preserved from a previous connection.
|
* Listeners will be preserved from a previous connection.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @throws XMPPException if an error occurs on the XMPP protocol level.
|
* @throws XMPPException if an error occurs on the XMPP protocol level.
|
||||||
* @throws SmackException if an error occurs somewhere else besides XMPP protocol level.
|
* @throws SmackException if an error occurs somewhere else besides XMPP protocol level.
|
||||||
|
|
|
@ -803,12 +803,12 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Establishes a connection to the XMPP server and performs an automatic login
|
* Establishes a connection to the XMPP server. It basically
|
||||||
* only if the previous connection state was logged (authenticated). It basically
|
* creates and maintains a socket connection to the server.
|
||||||
* creates and maintains a socket connection to the server.<p>
|
* <p>
|
||||||
* <p/>
|
|
||||||
* Listeners will be preserved from a previous connection if the reconnection
|
* Listeners will be preserved from a previous connection if the reconnection
|
||||||
* occurs after an abrupt termination.
|
* occurs after an abrupt termination.
|
||||||
|
* </p>
|
||||||
*
|
*
|
||||||
* @throws XMPPException if an error occurs while trying to establish the connection.
|
* @throws XMPPException if an error occurs while trying to establish the connection.
|
||||||
* @throws SmackException
|
* @throws SmackException
|
||||||
|
@ -831,13 +831,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
||||||
// Make note of the fact that we're now connected.
|
// Make note of the fact that we're now connected.
|
||||||
connected = true;
|
connected = true;
|
||||||
callConnectionConnectedListener();
|
callConnectionConnectedListener();
|
||||||
|
|
||||||
// Automatically makes the login if the user was previously connected successfully
|
|
||||||
// to the server and the connection was terminated abruptly
|
|
||||||
if (wasAuthenticated) {
|
|
||||||
login();
|
|
||||||
notifyReconnection();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue