Closed louislefevre closed 3 years ago
The bug was caused by emitting the circuitReady
event before the quantum register nodes advanced to await circuitReady()
line. A slight change in execution order and use process.nextTick()
to emit event solves the issue.
Bug Description
When executing a quantum register for the first time in a fresh Node-RED session, the
await circuitReady
code will freeze execution. If the circuit is re-run a second time during the same session, it will run just fine. Essentially, this bug only occurs when the circuit is being run for the first time in a given session. After that, it runs fine.Steps to Reproduce Bug
await circuitReady
inquantum-register.js
.await circuitReady
.Additional Information
https://github.com/louislefevre/node-red-contrib-quantum/blob/46a8320cb304cc4b58438429b398bc780ad7d832/quantum/nodes/quantum-register/quantum-register.js#L105
System Information