mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 12:02:05 +01:00
Only reset Roster on clean termination
As otherwise the Roster would be still unitialized after a SM resumption if the connection was uncleanly terminated. Thanks to Grigory Fedorov for reporting this.
This commit is contained in:
parent
b043d9f5b5
commit
fc3f5ef99e
1 changed files with 3 additions and 3 deletions
|
@ -33,7 +33,7 @@ import java.util.concurrent.CopyOnWriteArraySet;
|
|||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import org.jivesoftware.smack.AbstractConnectionClosedListener;
|
||||
import org.jivesoftware.smack.AbstractConnectionListener;
|
||||
import org.jivesoftware.smack.ConnectionCreationListener;
|
||||
import org.jivesoftware.smack.ExceptionCallback;
|
||||
import org.jivesoftware.smack.Manager;
|
||||
|
@ -279,7 +279,7 @@ public final class Roster extends Manager {
|
|||
}, PresenceTypeFilter.SUBSCRIBE);
|
||||
|
||||
// Listen for connection events
|
||||
connection.addConnectionListener(new AbstractConnectionClosedListener() {
|
||||
connection.addConnectionListener(new AbstractConnectionListener() {
|
||||
|
||||
@Override
|
||||
public void authenticated(XMPPConnection connection, boolean resumed) {
|
||||
|
@ -299,7 +299,7 @@ public final class Roster extends Manager {
|
|||
}
|
||||
|
||||
@Override
|
||||
public void connectionTerminated() {
|
||||
public void connectionClosed() {
|
||||
// Changes the presence available contacts to unavailable
|
||||
setOfflinePresencesAndResetLoaded();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue