mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-22 03:52:06 +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) {
|
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