Comparing version 0.2.21 to 0.2.22
@@ -146,6 +146,16 @@ (function (global, factory) { | ||
value: function setKeepAliveInterval(keepAliveInterval) { | ||
this.mqttConfig.keepalive = keepAliveInterval; | ||
this.mqttConfig.keepalive = keepAliveInterval || 60; | ||
this.log.debug("[BaseClient:setKeepAliveInterval] Connection Keep Alive Interval value set to " + this.mqttConfig.keepalive + " Seconds"); | ||
} | ||
}, { | ||
key: 'setCleanSession', | ||
value: function setCleanSession(cleanSession) { | ||
if (!(0, _utilUtilJs.isBoolean)(cleanSession) && cleanSession !== 'true' && cleanSession !== 'false') { | ||
this.log.debug("[BaseClient:setCleanSession] Value given for cleanSession is " + cleanSession + " , is not a Boolean, setting to true"); | ||
cleanSession = true; | ||
} | ||
this.mqttConfig.clean = cleanSession; | ||
this.log.debug("[BaseClient:setCleanSession] Connection Clean Session value set to " + this.mqttConfig.clean); | ||
} | ||
}, { | ||
key: 'connect', | ||
@@ -152,0 +162,0 @@ value: function connect() { |
{ | ||
"name": "ibmiotf", | ||
"version": "0.2.21", | ||
"version": "0.2.22", | ||
"description": "A library for developing device and application clients for IBM Internet of Things Foundation", | ||
@@ -5,0 +5,0 @@ "main": "dist/iotf-client.js", |
@@ -108,6 +108,15 @@ /** | ||
setKeepAliveInterval(keepAliveInterval) { | ||
this.mqttConfig.keepalive = keepAliveInterval; | ||
this.mqttConfig.keepalive = keepAliveInterval||60; | ||
this.log.debug("[BaseClient:setKeepAliveInterval] Connection Keep Alive Interval value set to "+this.mqttConfig.keepalive+" Seconds"); | ||
} | ||
setCleanSession(cleanSession){ | ||
if(!isBoolean(cleanSession) && cleanSession !== 'true' && cleanSession !== 'false'){ | ||
this.log.debug("[BaseClient:setCleanSession] Value given for cleanSession is "+cleanSession+" , is not a Boolean, setting to true"); | ||
cleanSession = true; | ||
} | ||
this.mqttConfig.clean = cleanSession; | ||
this.log.debug("[BaseClient:setCleanSession] Connection Clean Session value set to "+this.mqttConfig.clean); | ||
} | ||
connect(){ | ||
@@ -114,0 +123,0 @@ this.log.info("[BaseClient:connect] Connecting to IoTF with host : "+this.host); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
1533344
28685