1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-19 02:22:05 +01:00

[caps] Use a synchronous listener for incoming presence stanzas

Fixes SMACK-937.
This commit is contained in:
Florian Schmaus 2023-11-24 12:14:59 +01:00
parent 2e79a6b718
commit ccfbf9f346

View file

@ -354,7 +354,10 @@ public final class EntityCapsManager extends Manager {
if (autoEnableEntityCaps)
enableEntityCaps();
connection.addAsyncStanzaListener(new StanzaListener() {
// Note that this is a *synchronous* stanza listener to avoid unnecessary feature lookups. If this were to be an
// asynchronous listener, then it would be possible that the entity caps information was not processed when the
// features of entity are looked up. See SMACK-937.
connection.addStanzaListener(new StanzaListener() {
// Listen for remote presence stanzas with the caps extension
// If we receive such a stanza, record the JID and nodeVer
@Override