Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid an indefinite recursion that grows the call stack when reportin…
…g the current state fails 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>
- Loading branch information