mirror of
https://github.com/vanitasvitae/Smack.git
synced 2025-09-09 17:19:39 +02: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
|
@ -803,12 +803,12 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
}
|
||||
|
||||
/**
|
||||
* Establishes a connection to the XMPP server and performs an automatic login
|
||||
* only if the previous connection state was logged (authenticated). It basically
|
||||
* creates and maintains a socket connection to the server.<p>
|
||||
* <p/>
|
||||
* Establishes a connection to the XMPP server. It basically
|
||||
* creates and maintains a socket connection to the server.
|
||||
* <p>
|
||||
* Listeners will be preserved from a previous connection if the reconnection
|
||||
* occurs after an abrupt termination.
|
||||
* </p>
|
||||
*
|
||||
* @throws XMPPException if an error occurs while trying to establish the connection.
|
||||
* @throws SmackException
|
||||
|
@ -831,13 +831,6 @@ public class XMPPTCPConnection extends AbstractXMPPConnection {
|
|||
// Make note of the fact that we're now connected.
|
||||
connected = true;
|
||||
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…
Add table
Add a link
Reference in a new issue