mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-24 04:52:05 +01:00
Merge pull request #577 from Flowdalic/supress-roster-not-loaded-warning
Supress roster not loaded warning if self-presence
This commit is contained in:
commit
505e1088b4
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) {
|
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);
|
LOGGER.warning("Roster not loaded while processing " + packet);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
final Presence presence = (Presence) packet;
|
final Presence presence = (Presence) packet;
|
||||||
final Jid from = presence.getFrom();
|
|
||||||
|
|
||||||
final BareJid key;
|
final BareJid key;
|
||||||
if (from != null) {
|
if (from != null) {
|
||||||
|
|
Loading…
Reference in a new issue