New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-mqtt-pahojs

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-mqtt-pahojs - npm Package Compare versions

Comparing version

to
1.4.0

2

package.json
{
"name": "cordova-plugin-mqtt-pahojs",
"cordova_name": "MQTT JavaScript Client",
"version": "1.3.4",
"version": "1.4.0",
"description": "Pure JavaScript MQTT client library. Wrapper for paho.js",

@@ -6,0 +6,0 @@ "scripts": {

@@ -21,2 +21,4 @@ var Paho = require('./paho_mqttws31');

this.clientId = options.clientId || options.clientID || options.client || "BeeToo";
this.userName = options.userName ? '' + options.userName : null;
this.password = options.password ? '' + options.password : null;
this.reportConnectionStatus = options.reportConnectionStatus || false;

@@ -129,3 +131,8 @@ this.restoreConnection = true;

var connectionParams = {onSuccess: connectionSuccess.bind(this), onFailure: connectionFailed.bind(this)};
var connectionParams = {
onSuccess: connectionSuccess.bind(this),
onFailure: connectionFailed.bind(this),
userName: this.userName,
password: this.password
};
if (this.keepAliveInterval) connectionParams.keepAliveInterval = this.keepAliveInterval;

@@ -148,3 +155,3 @@ if (this.timeout) connectionParams.timeout = this.timeout;

this.connect(true).catch(function(e) {
console.error('Error connecting, cause: ' + (e ? e.message : 'unknown reason'));
console.error('Error connecting, cause: ' + (e ? (e.message || e.errorMessage) : 'unknown reason'));
});

@@ -156,3 +163,3 @@ }

this.disconnect().then(_connect.bind(this)).catch(function(e) {
console.error('Error disconnecting, cause: ' + (e ? e.message : 'unknown reason'));
console.error('Error disconnecting, cause: ' + (e ? (e.message || e.errorMessage) : 'unknown reason'));
setTimeout(_connect.bind(this), 0);

@@ -159,0 +166,0 @@ }.bind(this));