Hi There,
as part of my Erlang-RED thingy, I'm creating a test suite of flows for testing the functionality of the core nodes.
I've just come to the complete node and discovered that it's fairly simple to create an endless loop, this flow:
[{"id":"5ae6a7d5d44da483","type":"inject","z":"10642cf9052e8079","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":395,"y":825,"wires":[["036933e4ccc328e9"]]},{"id":"70cab6b8dd684978","type":"complete","z":"10642cf9052e8079","name":"","scope":["5ae6a7d5d44da483","e763535a1e29636d","036933e4ccc328e9"],"uncaught":false,"x":646,"y":658,"wires":[["e763535a1e29636d"]]},{"id":"e763535a1e29636d","type":"debug","z":"10642cf9052e8079","name":"debug 394","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":1003,"y":638,"wires":[]},{"id":"036933e4ccc328e9","type":"debug","z":"10642cf9052e8079","name":"debug 395","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":845,"y":840,"wires":[]}]
basically the complete node listens to the debug connected to itself and well ... yes I had to restart node red after pressing the button on the inject node. Of course, complete also listens to the other two nodes, else it would receive any message.
I used 4.0.5 for that.
I guess one way to prevent this would be to check what nodes are connected to the complete and don't show them in the list. However what about second degree nodes (i.e. nodes connected to the nodes connected to the complete). I can understand this is a non-trivial thing to prevent but on the other hand message do have msgid and the complete node could keep a list of them ....
EDIT: msgId won't work since complete should (in this flow) receive the same msgId three times - once each from all three nodes. But how should it know that.