infrafast / piwebpool

The first full open source Raspberry PI PHP web-based application that automates the control of swimming pool
https://infrafast.github.io/piwebpool/
3 stars 1 forks source link

listeners loop #23

Closed infrafast closed 7 years ago

infrafast commented 7 years ago

some listeners when they are triggered by the fire will callback the change state function that will again trigger the fire and a loop is made. This should be avoided by checking who is the caller, if this is the same as the registered URL, we don't fire.

infrafast commented 7 years ago

before chaning state, check if the command differs from the current state. Do nothing if equal = prevents infinite loop