mirror of
				https://github.com/node-red/node-red-nodes.git
				synced 2025-03-01 10:37:43 +00:00 
			
		
		
		
	Merge pull request #11 from magicmonkey/blink1-clean-restart
Blink1 clean restart
This commit is contained in:
		| @@ -50,10 +50,15 @@ function Blink1Node(n) { | |||||||
|                 node.warn("No Blink1 found"); |                 node.warn("No Blink1 found"); | ||||||
|             } |             } | ||||||
|         }); |         }); | ||||||
|  |         this.on("close", function() { | ||||||
|  |             if (blink1 && typeof blink1.close == "function") { | ||||||
|  |                 blink1.close(); | ||||||
|  |             } | ||||||
|  |         }); | ||||||
|         var blink1 = new Blink1.Blink1(); |         var blink1 = new Blink1.Blink1(); | ||||||
|     } |     } | ||||||
|     catch(e) { |     catch(e) { | ||||||
|         node.error("No Blink1 found"); |         node.error("No Blink1 found (" + e + ")"); | ||||||
|     } |     } | ||||||
| } | } | ||||||
| RED.nodes.registerType("blink1",Blink1Node); | RED.nodes.registerType("blink1",Blink1Node); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user