1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Allow retained status message to be cleared

This commit is contained in:
Nick O'Leary 2014-06-21 22:43:40 +01:00
parent ed3be7f82e
commit 842e7cf5f5

View File

@ -78,6 +78,8 @@ function start() {
function publish(topic,data,retain) { function publish(topic,data,retain) {
if (retain) { if (retain) {
retained[topic] = data; retained[topic] = data;
} else {
delete retained[topic];
} }
lastSentTime = Date.now(); lastSentTime = Date.now();
activeConnections.forEach(function(conn) { activeConnections.forEach(function(conn) {