Skip to content

Commit

Permalink
added retain options to mqtt publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Manuel Zangl committed Apr 4, 2017
1 parent 4a91a36 commit 434816d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mqtt_ascoltatore.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ MQTTAscoltatore.prototype.publish = function publish(topic, message, options, do
this._raiseIfClosed();

this._client.publish(this._pubTopic(topic), message, {
qos: (options && (options.qos !== undefined)) ? options.qos : 1
qos: (options && (options.qos !== undefined)) ? options.qos : 1,
retain: (options && (options.retain !== undefined)) ? options.retain : false
}, function() {
debug("new message published to " + topic);
wrap(done)();
Expand Down

0 comments on commit 434816d

Please sign in to comment.