# Two way switch infinite loop

**URL:** https://discourse.nodered.org/t/two-way-switch-infinite-loop/67115
**Category:** General
**Tags:** function-node, mqtt
**Created:** [30 August 2022 09:24 UTC](https://discourse.nodered.org/t/two-way-switch-infinite-loop/67115 "2022-08-30T09:24:18Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Paul-Reed](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/paul-reed/32/66906_2.png) [@Paul-Reed](https://discourse.nodered.org/u/Paul-Reed)
#### Post date: [30 August 2022 09:47 UTC](https://discourse.nodered.org/t/two-way-switch-infinite-loop/67115/2 "2022-08-30T09:47:20Z")

</div>

Hi Peter, the flow that you posted cannot be imported for others to test because it has not been formatted correctly.  
Any code or flows posted in the forum **must** follow these guidelines;

> [@How to share code or flow json](https://discourse.nodered.org/t/how-to-share-code-or-flow-json/506):
>
> To share code samples or flow json in this forum, you need to take care to format it properly so that it is displayed correctly. The easiest way to do that is to click the 'Preformatted Text' button in the toolbar: [image] Then paste in your code or flow json. You should end up with three back-tick characters - ``` - on their own line before and after the code. On standard US English keyboards, this is on the same key as the ~ character. Using the backticks will ens…

Please read the link, then edit your post above using the pencil icon at the bottom of your post.

---

_[View the full topic](https://discourse.nodered.org/t/two-way-switch-infinite-loop/67115)._
