avoid relaying changes if theres no one listening to the passthrough

This commit is contained in:
Salomão
2021-07-05 19:56:41 -03:00
parent b6eef99312
commit d48c24a2e1
3 changed files with 19 additions and 1 deletions
+1 -1
View File
@@ -262,7 +262,7 @@ public class NetworkMonitor<T extends IAEStack<T>> implements IMEMonitor<T>
{
final Entry<IMEMonitorHandlerReceiver<T>, Object> o = i.next();
final IMEMonitorHandlerReceiver<T> receiver = o.getKey();
if( receiver.isValid( o.getValue() ) )
if( receiver.isValid( o.getValue() ) && receiver.hasListeners() )
{
receiver.postChange( this, diff, src );
}