07.03.2023, 12:03
This won't work because each time you call actualizarEstados a new function is created.
If you don't have any other code modifying the listeners array you can simply remove the last listener that has been registered like this:
If you don't have any other code modifying the listeners array you can simply remove the last listener that has been registered like this:
Code:
function removelistenerlast(addr) {
var id = Scada.encodeGroupAddress(addr);
var listeners = objectStore.listeners[ id ] || [];
listeners.pop();
}