# Flow infinite looping

**URL:** <https://discourse.nodered.org/t/flow-infinite-looping/1392>\
**Category:** General\
**Created:** [6 July 2018 07:32 UTC](https://discourse.nodered.org/t/flow-infinite-looping/1392 "2018-07-06T07:32:02Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ThanosMel](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@ThanosMel](https://discourse.nodered.org/u/ThanosMel)\
**Post date:** [6 July 2018 07:32 UTC](https://discourse.nodered.org/t/flow-infinite-looping/1392/1 "2018-07-06T07:32:02Z")

</div>

Hello, i want to update flows remotely. So i have this flow , i first send a get request to take the new flows ,then i check if the new flows are the same with the current ones. If the new flows are not the same with the current ones i post them with POST/flows . The problem is that the flow keep repeating it's self and sending request all the time and i don't know why.

`[{"id":"247a364c.595f1a","type":"debug","z":"61c930c3.17aa8","name":"Console","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","x":1546.0001468658447,"y":195.00001335144043,"wires":[]},{"id":"6597fd71.7a5d14","type":"http request","z":"61c930c3.17aa8","name":"Get Request","method":"GET","ret":"txt","url":"http://localhost:1880/flows","tls":"","x":275.0000457763672,"y":205.00002765655518,"wires":[["fa9264fa.00b7a8"]]},{"id":"2dd0c87.e29d738","type":"http request","z":"61c930c3.17aa8","name":"Post Request","method":"POST","ret":"txt","url":"http://localhost:1880/flows","tls":"","x":1381.9999923706055,"y":196.0000057220459,"wires":[["247a364c.595f1a"]]},{"id":"403dfd49.9568f4","type":"change","z":"61c930c3.17aa8","name":"set post req headers","rules":[{"t":"set","p":"headers","pt":"msg","to":"{\"Accept\":\"application/json\"}","tot":"json"}],"action":"","property":"","from":"","to":"","reg":false,"x":1159.0000305175781,"y":198.0000057220459,"wires":[["2dd0c87.e29d738"]]},{"id":"9628daed.9bf328","type":"inject","z":"61c930c3.17aa8","name":"Event Initiation","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":true,"onceDelay":0.1,"x":98,"y":202.8554744720459,"wires":[["6597fd71.7a5d14"]]},{"id":"fdd1f733.06fe58","type":"http request","z":"61c930c3.17aa8","name":"Get Curr flows","method":"GET","ret":"txt","url":"http://localhost:1880/flows","tls":"","x":577.1666793823242,"y":205.33334922790527,"wires":[["500388c.c91cd78"]]},{"id":"500388c.c91cd78","type":"switch","z":"61c930c3.17aa8","name":"Identical Checker","property":"payload","propertyType":"msg","rules":[{"t":"eq","v":"temp","vt":"msg"}],"checkall":"true","repair":false,"outputs":1,"x":774.9999923706055,"y":203.0000057220459,"wires":[["3282e3b8.ca16ec"]]},{"id":"fa9264fa.00b7a8","type":"function","z":"61c930c3.17aa8","name":"","func":"var temp = msg.payload;\nmsg.temp = msg.payload;\nreturn msg;","outputs":1,"noerr":0,"x":422.1666793823242,"y":207.33334159851074,"wires":[["fdd1f733.06fe58"]]},{"id":"3282e3b8.ca16ec","type":"json","z":"61c930c3.17aa8","name":"","property":"payload","action":"","pretty":false,"x":962.5312767028809,"y":201.9140682220459,"wires":[["403dfd49.9568f4"]]}]`

---

<div class="post-metadata">

**Author:** ![ThanosMel](https://avatars.discourse-cdn.com/v4/letter/t/db5fbb/32.png) [@ThanosMel](https://discourse.nodered.org/u/ThanosMel)\
**Post date:** [6 July 2018 07:43 UTC](https://discourse.nodered.org/t/flow-infinite-looping/1392/2 "2018-07-06T07:43:01Z")

</div>

The inject node was the problem. Sometimes obvious things are not that obvious
