From 842e7cf5f54d2760a11b38ba0143036965cef343 Mon Sep 17 00:00:00 2001 From: Nick O'Leary Date: Sat, 21 Jun 2014 22:43:40 +0100 Subject: [PATCH] Allow retained status message to be cleared --- red/comms.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/red/comms.js b/red/comms.js index d1bd98649..f16ba6f5a 100644 --- a/red/comms.js +++ b/red/comms.js @@ -78,6 +78,8 @@ function start() { function publish(topic,data,retain) { if (retain) { retained[topic] = data; + } else { + delete retained[topic]; } lastSentTime = Date.now(); activeConnections.forEach(function(conn) {