mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-12-22 10:37:59 +01:00
[disco] Only perform entity capabilities work if there are any listeners
This commit is contained in:
parent
5b6dd8e3f7
commit
69e81b748e
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,6 @@
|
|||
/**
|
||||
*
|
||||
* Copyright 2003-2007 Jive Software, 2018-2020 Florian Schmaus.
|
||||
* Copyright 2003-2007 Jive Software, 2018-2022 Florian Schmaus.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -933,6 +933,10 @@ public final class ServiceDiscoveryManager extends Manager {
|
|||
* Notify the {@link EntityCapabilitiesChangedListener} about changed capabilities.
|
||||
*/
|
||||
private synchronized void renewEntityCapsVersion() {
|
||||
if (entityCapabilitiesChangedListeners.isEmpty()) {
|
||||
return;
|
||||
}
|
||||
|
||||
renewEntityCapsRequested++;
|
||||
if (renewEntityCapsScheduledAction != null) {
|
||||
boolean canceled = renewEntityCapsScheduledAction.cancel();
|
||||
|
|
Loading…
Reference in a new issue