I'm building an AV control system using node-red. One of my actions is for listening to music at night. In that action it sets a delay for 90 minutes to turn everything off. That works 100% correctly. In the other actions I send a msg to the night music subflow with msg.reset=true to cancel the delay. This is in case the night music was accidentally hit so you can hit the other action and have it cancel the delay so it doesn't shut everything off in 90 minutes. This msg.reset=true fails to cancel the delay 100% of the time.
To test it I created a subflow that prints the entire msg then has a delay for 2 minutes then displays the entire msg via the debug node. I have two injects in a flow to test it, one sends a msg to the subflow, the other sends a msg with msg.reset=true set. These work 100% of the time, hit the first one and you see the msg displayed and the delay is activated. 2 minutes later you see the entire msg displayed again. If you press the first inject then after that press the second inject you see the debug msg displayed from the first inject then the msg displayed with reset=true from the second inject but you don't see the msg displayed again from the debug node after the delay node. This works 100% of the time.
However, if I move the setting of the msg.reset into a subflow that will call the original test subflow that will fail 100% of the time even though the debug message shows msg.reset is set to true. It will always execute the debug node after the delay node. In other words, the start delay inject calls subflow A which is the one that has the delay. The cancel inject calls subflow B which uses a change node to set msg.reset=true then pass the msg to subflow A. You see the msg.reset=true in the debug log but the debug node after the delay is always executed thus it didn't cancel the delay.
Any ideas why the reset does not work correctly when initiated from within a subflow but does work correctly when initiated from within a flow?