mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-24 21:12:05 +01:00
[roster] suppress "roster not loaded while processing presence" if self-presence
Fixes SMACK-941.
This commit is contained in:
parent
8b9a9e0f3e
commit
6918663760
1 changed files with 11 additions and 2 deletions
|
@ -1534,11 +1534,20 @@ public final class Roster extends Manager {
|
|||
|
||||
}
|
||||
}
|
||||
|
||||
final Jid from = packet.getFrom();
|
||||
|
||||
if (!isLoaded() && rosterLoadedAtLogin) {
|
||||
XMPPConnection connection = connection();
|
||||
|
||||
// Only log the warning, if this is not the reflected self-presence. Otherwise,
|
||||
// the reflected self-presence may cause a spurious warning in case the
|
||||
// connection got quickly shut down. See SMACK-941.
|
||||
if (connection != null && from != null && !from.equals(connection.getUser())) {
|
||||
LOGGER.warning("Roster not loaded while processing " + packet);
|
||||
}
|
||||
}
|
||||
final Presence presence = (Presence) packet;
|
||||
final Jid from = presence.getFrom();
|
||||
|
||||
final BareJid key;
|
||||
if (from != null) {
|
||||
|
|
Loading…
Reference in a new issue