mirror of
https://github.com/balena-os/balena-supervisor.git
synced 2025-02-01 00:45:23 +00:00
51d6ab01c9
We used to have a recursion based on Promises and Promise.delay, which caused the promise never to resolve so eventually the stack would be exhausted. This fixes it by using a simpler way to check if reporting the state is in progress and using a setImmediate to call applyState outside of the Promise chain. Change-Type: patch Signed-off-by: Pablo Carranza Velez <pablo@resin.io>